389
|
1 asdasd=1;
|
|
2 function MadSwatter(inkscape)
|
|
3 {
|
|
4 this.inkscape = inkscape;
|
|
5 }
|
|
6
|
|
7
|
|
8 function MadSwatter_callback(mbsvg,self)
|
|
9 {
|
|
10
|
|
11 $(self.inkscape.mbsvg.doc).find("channels").replaceWith(mbsvg.find("channels"));
|
|
12 $('#display').tabs('select',0);
|
|
13 //self.inkscape.updateDocument();
|
|
14 }
|
|
15
|
|
16 MadSwatter.prototype.edit=function()
|
|
17 {
|
|
18 // Generate a new document with the current scene
|
|
19 // FIXME: Do we need to do animation filter here?
|
|
20 // FIXME: Do we need to support hiearchical animation?
|
|
21 $('#display').tabs('select',2);
|
|
22 var kk = this.inkscape.mbsvg.generateCurrentSVG();
|
|
23 //MadSwatter_invoke(kk,MadSwatter_callback,this);
|
|
24 // Simulate the MadSwatter
|
|
25 kk.find("metadata").append("<channels></channels>");
|
|
26 setTimeout(function () { MadSwatter_callback(kk,this);}, 3000);
|
|
27 }
|