I have an EXT JS window. I have set it to as draggable =true. But i only want it to be dragged not all around the screen but within a limited portion of the screen. Like 2 CM(centimeters) to the left or Right. and 2 CM up and down.
How can i achieve this ?
You can use the constrain config on window to have it be constrained to its parent element. http://docs.sencha.com/ext-js/4-1/#!/api/Ext.window.Window-cfg-constrain . By default Windows render to the document body so in order to constrain to a particular element you can create a parent that has a window in it.