changeset 848:702e4874a58a

Use the center as the default transformaqtion point.
author wycc
date Mon, 20 Sep 2010 21:47:21 +0800
parents dfe28355bded
children d1c98eb474e1
files nodejs/svg.js
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/nodejs/svg.js	Sun Sep 19 19:28:33 2010 +0800
+++ b/nodejs/svg.js	Mon Sep 20 21:47:21 2010 +0800
@@ -276,10 +276,10 @@
 
     tgt.center = center = new Object();
     
-    //center.x = bbox.width / 2 + bbox.x;
-    //center.y = bbox.height / 2 + bbox.y;
-    center.x = bbox.x;
-    center.y = bbox.y;
+    center.x = bbox.width / 2 + bbox.x;
+    center.y = bbox.height / 2 + bbox.y;
+    //center.x = bbox.x;
+    //center.y = bbox.y;
     a = node.attr("transform-center-x");
     if(!a)
 	return 1;