changeset 359:b4bd4819091c

Load mbsvg file when it is double clicked
author wycc
date Wed, 11 Mar 2009 08:30:11 +0800
parents 50d33c3987ba
children b4f74753d125
files inkscape/firefox/content/inkscape.js
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/inkscape/firefox/content/inkscape.js	Wed Mar 11 07:52:30 2009 +0800
+++ b/inkscape/firefox/content/inkscape.js	Wed Mar 11 08:30:11 2009 +0800
@@ -437,6 +437,12 @@
 }
 
 
+function project_loadScene(node)
+{
+	var file = node.textContent;
+	inkscape = new Inkscape("file://"+file);
+}
+
 function project_parse(xml)
 {
 
@@ -495,6 +501,9 @@
 			}
 		],
 	    },
+	    callback : {
+	        ondblclk : function(NODE,TREE_OBJ) { project_loadScene(NODE); TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE); TREE_OBJ.select_branch.call(TREE_OBJ, NODE);}
+	    },
 	    ui : {
 		context :  [ 
 			{