Index: dojo-release-1.3.2-src/dojox/layout/FloatingPane.js =================================================================== --- dojo-release-1.3.2-src.orig/dojox/layout/FloatingPane.js 2009-11-17 17:01:48.687500000 -0800 +++ dojo-release-1.3.2-src/dojox/layout/FloatingPane.js 2009-11-17 17:12:28.781250000 -0800 @@ -30,6 +30,15 @@ // Allow resizing of pane true if true resizable: false, + // movable: Boolean + // Pane can be draggable if true + movable: false, + + // constraintMoveBox: + // To restrict pane move within the constraint box boundaries. + // This can be in the form of {l: 50, t: 200, w: 300: h: 150} + constraintMoveBox: null, + // maxable: Boolean // Horrible param name for "Can you maximize this floating pane?" maxable: false, @@ -81,7 +90,8 @@ this.setTitle(this.title); this.inherited(arguments); - var move = new dojo.dnd.Moveable(this.domNode,{ handle: this.focusNode }); + //var move = new dojo.dnd.Moveable(this.domNode,{ handle: this.focusNode }); + this.setMovable(this.movable); //this._listener = dojo.subscribe("/dnd/move/start",this,"bringToTop"); if(!this.dockable){ this.dockNode.style.display = "none"; } @@ -234,6 +244,30 @@ this._maximized = true; }, + setMovable: function(canMove) { + // summary: + // Changes the draggable behaviour of the pane. + // + // canMove: boolean + // If it is true it can be movable by its title bar. If it is false it cannot be moved. + this.movable = canMove; + if (this._moveableHandle) { + this._moveableHandle.destroy() + } + if (this.movable) { + var constraintBox = this.constraintMoveBox; + if (!constraintBox){ + constraintBox = dijit.getViewport(); + } + this._moveableHandle = new dojo.dnd.move.boxConstrainedMoveable( + this.domNode, {box: constraintBox, within: true},{ handle: this.focusNode }); + + dojo.removeClass(this.domNode, "nonMovable"); + } else { + dojo.addClass(this.domNode, "nonMovable"); + } + }, + _restore: function(){ if(this._maximized){ this.resize(this._naturalState);