-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-resizer.ResizeTracker'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-resizer-ResizeTracker'>/**
</span> * @class Ext.resizer.ResizeTracker
* @extends Ext.dd.DragTracker
*/
this.startBox = this.el.getBox();
},
-<span id='Ext-resizer.ResizeTracker-method-getDynamicTarget'> /**
+<span id='Ext-resizer-ResizeTracker-method-getDynamicTarget'> /**
</span> * @private
* Returns the object that will be resized on every mousemove event.
* If dynamic is false, this will be a proxy, otherwise it will be our actual target.
// out of bounds
if (newBox.width < me.minWidth || newBox.width > me.maxWidth) {
newBox.width = Ext.Number.constrain(newBox.width, me.minWidth, me.maxWidth);
- newBox.x = me.lastX || newBox.x;
+
+ // Re-adjust the X position if we were dragging the west side
+ if (adjustX) {
+ newBox.x = box.x + (box.width - newBox.width);
+ }
} else {
me.lastX = newBox.x;
}
if (newBox.height < me.minHeight || newBox.height > me.maxHeight) {
newBox.height = Ext.Number.constrain(newBox.height, me.minHeight, me.maxHeight);
- newBox.y = me.lastY || newBox.y;
+
+ // Re-adjust the Y position if we were dragging the north side
+ if (adjustY) {
+ newBox.y = box.y + (box.height - newBox.height);
+ }
} else {
me.lastY = newBox.y;
}
}
}
});
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>