RasterTreeEvent.position
Access: | readonly |
Type: | string |
Position Value Description
beforeDrop will happen before the given
item
.
overDrop will happen over the given
item
.
afterDrop will happen after the given
item
.
If the event handler wishes to accept a drop of the
dragValue
at
the current location, it must call RasterEvent.accept()
highlight
the item
as a potential drop target (i.e. draw insertion line
or shaded box at the item's location).
The event handler may alter the default drop effect by passing a new
position
value to RasterEvent.accept()
method. For example, if a tree doesn't want to accept dragged values
"over" any item, it can pass the argument "before" to the
accept()
method. This will make the drop target to render as
an "insertion line" before the item instead of a "shaded box"
over the item.
function myHandler( e ) { : // do not accept drag values 'over' items, // only 'before' or 'after' if ( e.position=="over" ) e.accept( "before" ); // overwrite "over" with "before" else e.accept(); // accept current drop position }