diff inkscape/firefox/content/madswatter.js @ 389:45e04408fc19

Implement stub functions for the MadSwatter integration.
author wycc
date Sun, 12 Apr 2009 11:58:53 +0800
parents
children ebf83a50e1e1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inkscape/firefox/content/madswatter.js	Sun Apr 12 11:58:53 2009 +0800
@@ -0,0 +1,27 @@
+asdasd=1;
+function MadSwatter(inkscape)
+{
+	this.inkscape = inkscape;
+}
+
+
+function MadSwatter_callback(mbsvg,self)
+{
+
+	$(self.inkscape.mbsvg.doc).find("channels").replaceWith(mbsvg.find("channels"));
+	$('#display').tabs('select',0);
+	//self.inkscape.updateDocument();
+}
+
+MadSwatter.prototype.edit=function()
+{
+	// Generate a new document with the current scene
+	// FIXME: Do we need to do animation filter here?
+	// FIXME: Do we need to support hiearchical animation?
+	$('#display').tabs('select',2);
+	var kk = this.inkscape.mbsvg.generateCurrentSVG();
+	//MadSwatter_invoke(kk,MadSwatter_callback,this);
+	// Simulate the MadSwatter
+	kk.find("metadata").append("<channels></channels>");
+	setTimeout(function () { MadSwatter_callback(kk,this);}, 3000);
+}