Child pages
  • Client Design Mode

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

onDrag

 Handle start of a drag, it can set the data that should be transfered and should return a constant which dragndrop mode/modes is/are supported.
  
  Should The method should return a DRAGNDROP constant or for what mode is supported or a combination of 2 constants:
  DRAGNDROP.MOVE if only a move can happen,
  DRAGNDROP.COPY if only a copy can happen,
  DRAGNDROP.MOVE|DRAGNDROP.COPY if a move or copy can happen,
  DRAGNDROP.NONE if nothing is supported (drag should not start).

If you want to be able to cancel the drag if the user sets the element somewhere you don't want it, you should save the start positions here so you can restore them in the onDrop.

onDrop

Event to handle the drop. This is a good place to save the position and size of the element.

...