Functionality of resize and enable/disable of dragging