comparison inkscape/firefox/content/inkscape.js @ 359:b4bd4819091c

Load mbsvg file when it is double clicked
author wycc
date Wed, 11 Mar 2009 08:30:11 +0800
parents 50d33c3987ba
children 8c4456190d9a
comparison
equal deleted inserted replaced
358:50d33c3987ba 359:b4bd4819091c
435 sources = [src1,src2,src3]; 435 sources = [src1,src2,src3];
436 436
437 } 437 }
438 438
439 439
440 function project_loadScene(node)
441 {
442 var file = node.textContent;
443 inkscape = new Inkscape("file://"+file);
444 }
445
440 function project_parse(xml) 446 function project_parse(xml)
441 { 447 {
442 448
443 var xmlParser = new DOMParser(); 449 var xmlParser = new DOMParser();
444 var xmlDoc = xmlParser.parseFromString( xml, 'text/xml'); 450 var xmlDoc = xmlParser.parseFromString( xml, 'text/xml');
492 { attributes:{id:"scenes"}, data:"scene", children: scenes}, 498 { attributes:{id:"scenes"}, data:"scene", children: scenes},
493 { attributes:{id:"sources"},data:"sources",children: sources} 499 { attributes:{id:"sources"},data:"sources",children: sources}
494 ] 500 ]
495 } 501 }
496 ], 502 ],
503 },
504 callback : {
505 ondblclk : function(NODE,TREE_OBJ) { project_loadScene(NODE); TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE);}
497 }, 506 },
498 ui : { 507 ui : {
499 context : [ 508 context : [
500 { 509 {
501 id: "Open", 510 id: "Open",