Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • mxDragSource

Index

Constructors

constructor

  • new mxDragSource(element: HTMLElement, dropHandler?: Function): mxDragSource

Properties

autoscroll

autoscroll: boolean

Specifies if the graph should scroll automatically. Default is true.

checkEventSource

checkEventSource: boolean

Whether the event source should be checked in {@link graphContainerEvent}. Default is true.

currentDropTarget

currentDropTarget: mxCell

Holds the current drop target under the mouse.

currentGraph

currentGraph: mxGraph

Reference to the mxGraph that is the current drop target.

currentGuide

currentGuide: mxGuide

Holds an mxGuide for the currentGraph if {@link dragPreview} is not null.

currentHighlight

currentHighlight: mxCellHighlight

Holds an mxGuide for the currentGraph if {@link dragPreview} is not null.

note

wrong doc

currentPoint

currentPoint: mxPoint

Holds the current drop location.

dragElement

dragElement: HTMLElement

Holds the DOM node that is used to represent the drag preview. If this is null then the source element will be cloned and used for the drag preview.

dragElementOpacity

dragElementOpacity: number

Opacity of the drag element in %. Default is 70.

dragElementZIndex

dragElementZIndex: number

ZIndex for the drag element. Default is 100.

dragOffset

dragOffset: mxPoint

mxPoint that specifies the offset of the dragElement. Default is null.

dropHandler

dropHandler: Function

Holds the DOM node that is used to represent the drag preview. If this is null then the source element will be cloned and used for the drag preview.

element

element: HTMLElement

Reference to the DOM node which was made draggable.

enabled

enabled: boolean

Specifies if this drag source is enabled. Default is true.

gridEnabled

gridEnabled: boolean

Specifies if the grid should be allowed. Default is true.

guidesEnabled

guidesEnabled: boolean

Specifies if mxGuide should be enabled. Default is true.

highlightDropTargets

highlightDropTargets: boolean

Specifies if drop targets should be highlighted. Default is true.

previewElement

previewElement: mxRectangle

Optional mxRectangle that specifies the unscaled size of the preview.

Methods

createDragElement

  • createDragElement(evt: Event): Node
  • Creates and returns a clone of the {@link dragElementPrototype} or the element if the former is not defined.

    Parameters

    • evt: Event

    Returns Node

createPreviewElement

  • createPreviewElement(graph: mxGraph): HTMLElement
  • Creates and returns an element which can be used as a preview in the given graph.

    Parameters

    Returns HTMLElement

dragEnter

  • dragEnter(graph: mxGraph, evt: Event): void

dragExit

  • dragExit(graph: mxGraph, evt: Event): void

dragOver

  • dragOver(graph: mxGraph, evt: Event): void

drop

  • drop(graph: mxGraph, evt: Event, dropTarget: mxCell, x: number, y: number): void

getDropTarget

  • getDropTarget(graph: mxGraph, x: number, y: number, evt: PointerEvent): mxCell

getElementForEvent

  • getElementForEvent(evt: Event): Element

getGraphForEvent

  • getGraphForEvent(evt: MouseEvent): mxGraph

graphContainsEvent

  • graphContainsEvent(graph: mxGraph, evt: Event): boolean

isActive

  • isActive(): boolean

isEnabled

  • isEnabled(): boolean

isGridEnabled

  • isGridEnabled(): boolean

isGuidesEnabled

  • isGuidesEnabled(): boolean

mouseDown

  • Returns the drop target for the given graph and coordinates. This implementation uses mxGraph.getCellAt.

    To ignore popup menu events for a drag source, this function can be overridden as follows.

    example
    var mouseDown = dragSource.mouseDown;
    
    dragSource.mouseDown(evt)
    {
      if (!mxEvent.isPopupTrigger(evt))
      {
        mouseDown.apply(this, arguments);
      }
    };
    

    Parameters

    Returns void

mouseMove

  • mouseMove(evt: MouseEvent): void

mouseUp

  • mouseUp(evt: MouseEvent): void

removeDragElement

  • removeDragElement(): void

removeListeners

  • removeListeners(): void

reset

  • reset(): void

setEnabled

  • setEnabled(value: boolean): void

setGridEnabled

  • setGridEnabled(value: boolean): void

setGuidesEnabled

  • setGuidesEnabled(value: boolean): void

startDrag

stopDrag

  • stopDrag(): void

Generated using TypeDoc