'sw' southwest
'se' southeast
'ne' northeast
+ 'hd' horizontal drag
'all' all
</pre>
* <p>Here's an example showing the creation of a typical Resizable:</p>
y += diffY;
h -= diffY;
break;
+ case "hdrag":
+
+ if (wi) {
+ var adiffX = Math.abs(diffX);
+ var sub = (adiffX % wi); // how much
+ if (sub > (wi/2)) { // far enough to snap
+ diffX = (diffX > 0) ? diffX-sub + wi : diffX+sub - wi;
+ } else {
+ // remove difference..
+ diffX = (diffX > 0) ? diffX-sub : diffX+sub;
+ }
+ }
+ x += diffX;
+ x = Math.max(this.minX, x);
+ break;
case "west":
diffX = this.constrain(w, diffX, mw, mxw);
x += diffX;
w -= diffX;
break;
- case "hdrag":
- x += diffX;
- break;
case "northeast":
w += diffX;
w = Math.min(Math.max(mw, w), mxw);
case "southwest":
x -= sw - w;
break;
- case "hdrag":
case "west":
x -= sw - w;
break;
h = Math.min(Math.max(mh, h), mxh);
w = ow * (h/oh);
y += th - h;
- x += tw - w;
+ x += tw - w;
break;
}
}
+ if (pos == 'hdrag') {
+ w = ow;
+ }
this.proxy.setBounds(x, y, w, h);
if(this.dynamic){
this.resizeElement();
this.position = pos;
this.rz = rz;
// show north drag fro topdra
- var handlepos = pos == 'hdrag' ? 'north' : pos;;
+ var handlepos = pos == 'hdrag' ? 'north' : pos;
+
this.el = this.tpl.append(rz.el.dom, [handlepos], true);
+ if (pos == 'hdrag') {
+ this.el.setStyle('cursor', 'pointer');
+ }
this.el.unselectable();
if(transparent){
this.el.setOpacity(0);