X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FResizable.js;h=b0fb9f3b3f0435b26897c56cfb97d7d9820097a9;hb=dc5d9380aff25134bf025953bdafe40b580337ff;hp=d85b96899883a153839f20bb69990218a9ca93e7;hpb=732378a88c02efb9123afdee65b9eb8804d06936;p=roojs1 diff --git a/Roo/Resizable.js b/Roo/Resizable.js index d85b968998..b0fb9f3b3f 100644 --- a/Roo/Resizable.js +++ b/Roo/Resizable.js @@ -165,7 +165,7 @@ Roo.Resizable = function(el, config) if(this.draggable){ this.dd = this.dynamic ? this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); - this.dd.setHandleElId(this.resizeChild.id); + this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); } // public events @@ -177,6 +177,17 @@ Roo.Resizable = function(el, config) * @param {Roo.EventObject} e The mousedown event */ "beforeresize" : true, + /** + * @event resizing + * Fired a resizing. + * @param {Roo.Resizable} this + * @param {Number} x The new x position + * @param {Number} y The new y position + * @param {Number} w The new w width + * @param {Number} h The new h hight + * @param {Roo.EventObject} e The mouseup event + */ + "resizing" : true, /** * @event resize * Fired after a resize. @@ -335,7 +346,9 @@ Roo.extend(Roo.Resizable, Roo.util.Observable, { // private snap : function(value, inc, min){ - if(!inc || !value) return value; + if(!inc || !value) { + return value; + } var newValue = value; var m = value % inc; if(m > 0){ @@ -375,6 +388,7 @@ Roo.extend(Roo.Resizable, Roo.util.Observable, { // private onMouseMove : function(e){ + if(this.enabled){ try{// try catch so if something goes wrong the user doesn't get hung @@ -551,6 +565,7 @@ Roo.extend(Roo.Resizable, Roo.util.Observable, { } }catch(e){} } + this.fireEvent("resizing", this, x, y, w, h, e); }, // private @@ -652,6 +667,7 @@ Roo.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){ // private Roo.Resizable.Handle.prototype = { afterResize : function(rz){ + Roo.log('after?'); // do nothing }, // private