dynapi.api.ext.DragEvent - Quick Reference

Inherit: MouseEvent

Constructor

DragEvent(type,src)
...

Events

ondragend(e)
...
ondragmove(e)
...
ondragstart(e)
...
ondragover(e)
...
ondragout(e)
...
ondrop(e)
...

Public Methods

cancelDrag()
...
getPageX()
...
getPageY()
...
getX()
...
getY()
...

Private Methods

[none]

Static Methods

DragEvent.stopAtDocumentEdge(Boolean)
...
DragEvent.startDrag(e,dlyr)
...
DragEvent.setDragBoundary(lyr,t,r,b,l)
...
DragEvent.enableDragEvents()
...
DragEvent.disableDragEvents()
...

Methods applied to other objects

DynElement - DragDrop(s)
...
DynElement - DragOver(s)
...
DynLayer - setDragOverStealthMode(b)
...
DynLayer - getDragSource()
This functions is mainly used to return the current source of the object being dragged. For example, if the layer being dragged is a drag icon then this function will return the original source layer.
example:
var lyr = new DynLayer('Target',250,100,300,210,'gold');
dynapi.document.addChild(lyr,'target');
lyr.addEventListener({
    ondrop:function(e,dragIcon){
        o = dragIcon.getDragSource();
        alert("You've dropped layer "+o.id);
    }
});

DynLayer - setDragEnabled(b,boundary,useIcon)
b - (Boolean) Enables or disables dragging
boundary - (Object) Drag Boundary
useIcon - (Boolean) Enables or Disables the drag icon feature.
DynLayer - setDragIcon(icon)
icon - (DynLayer) A substitute to be used during a drag