You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2007/06/07 21:31:51 UTC
svn commit: r545276 -
/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js
Author: knopp
Date: Thu Jun 7 12:31:51 2007
New Revision: 545276
URL: http://svn.apache.org/viewvc?view=rev&rev=545276
Log:
minor resize improvements
Modified:
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js?view=diff&rev=545276&r1=545275&r2=545276
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax-debug.js Thu Jun 7 12:31:51 2007
@@ -129,13 +129,22 @@
var width = parseInt(window.style.width, 10) + deltaX;
var height = parseInt(log.style.height, 10) + deltaY;
- if (width < 200)
+ var res = [0, 0];
+
+ if (width < 200) {
+ res[0] = -deltaX;
width = 200;
- if (height < 100)
- height = 100;
+ }
+
+ if (height < 100) {
+ res[1] = -deltaY;
+ height = 100;
+ }
window.style.width = width + "px";
log.style.height = height + "px";
+
+ return res;
},
onDrag: function(element, deltaX, deltaY) {
@@ -143,14 +152,22 @@
var x = parseInt(w.style.left, 10) + deltaX;
var y = parseInt(w.style.top, 10) + deltaY;
+
+ var res = [0, 0];
- if (x < 0)
+ if (x < 0) {
+ res[0] = -deltaX;
x = 0;
- if (y < 0)
- y = 0;
+ }
+ if (y < 0) {
+ res[1] = -deltaY;
+ y = 0;
+ }
w.style.left = x + "px";
w.style.top = y + "px";
+
+ return res;
},
addElement : function(html) {