1.) When the page loads you can drag the image around, and it is constrained to the container (light grey backround).
2.) But if you resize the image and then drag it around the container, you can see that the constraint is tied to the original dimensions of the image.
Is this a possible bug?
I have been able to listen for the resize event and simply call constrainTo again to fix this, but is this the proper way to do it.
constrainTo operates similar to the other constrain functions. If something changes, you have to let it know. There is a post in the forums wih a simple 2-3 liner that sets it to reconstrain on each drag.
Jack Slocum
Ext JS Founder
Original author of Ext JS 1, 2 & 3.
Twitter: @jackslocum jack@extjs.com