O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hitting the drop zone

Once we have made our objects draggable we are ready to make them droppable. First, we need to define a valid drop zone, any zone that is not the valid one must return the selected object to its original state. Let's add some code to our objects so when it is not dropped in a valid zone it returns to its original state. To accomplish this, the Ext.dd.DD class has some abstract methods that can be overridden:

  • startDrag: It is an abstract method that is called after a drag/drop object is clicked and the drag or mouse-down time thresholds have been met
  • onDrag: It is an abstract method that is called during the onMouseMove event while dragging an object
  • onDragEnter: It is an abstract method that is called when this element begins ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required