Author: michiel
Date: 2010-04-28 17:25:46 +0200 (Wed, 28 Apr 2010)
New Revision: 42070
Modified:
speeltuin/mihxil/portal/trunk/test-webapp/src/main/webapp/edit/page/page.js
Log:
this is simpler, and works better
Modified:
speeltuin/mihxil/portal/trunk/test-webapp/src/main/webapp/edit/page/page.js
===================================================================
--- speeltuin/mihxil/portal/trunk/test-webapp/src/main/webapp/edit/page/page.js
2010-04-28 15:12:18 UTC (rev 42069)
+++ speeltuin/mihxil/portal/trunk/test-webapp/src/main/webapp/edit/page/page.js
2010-04-28 15:25:46 UTC (rev 42070)
@@ -11,14 +11,9 @@
stop: function(event, ui) {
var x = $(event.target).find("span.x");
var y = $(event.target).find("span.y");
- if (x[0].orig == null) {
- x[0].orig = parseInt(x.text());
- y[0].orig = parseInt(y.text());
- }
- var dx = ui.position.left / 150;
- var dy = ui.position.top / 150;
- x.text("" + (x[0].orig + dx));
- y.text("" + (y[0].orig + dy));
+ var position = $(event.target).position();
+ x.text("" + position.left / 150);
+ y.text("" + position.top / 150);
}
};
$(".mm_portal_content .block")
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs