PDA

View Full Version : Resizable and draggable panel: user does not want to be able to move while resizing



Drömbolaget
22 Aug 2012, 12:17 AM
I have a panel that the user needs to be able to both move and resize. The user does not want to be able to move the panel while the are resizing it. Basically, if you mousedown and drag on the body the panel should move. Mousedown on the resize handles it should resize in that direction but not move.

Here's what happens now when I resize upwards and move the mouse sideways at the same time. This is not standard behaviour for resize in other environments?

38139

Here's a minimal test case on jsfiddle
http://jsfiddle.net/kfU2E/

Drömbolaget
24 Sep 2012, 7:32 AM
See the Senchas own example.
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/draw/Sencha.html (http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/draw/Sencha.html)

If you resize by north, west or northwest then the image doesn't move, it just resizes. Feels quite weird.

Here's a similar jsFiddle example.
http://jsfiddle.net/mbZqj/3/

Drömbolaget
24 Sep 2012, 7:38 AM
Even though the parent in this case, a panel, has layout "absolute", the children that needs to be resizable each must have this property set to true for resizing to work as it would in any other program.


floating: true

You can still add floating children to a parent Panel. You just have to show() the child after you have added it to the parent.