Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NonRealtimeDraggingTool

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. Extensions can be found in the GoJS kit under the extensions or extensionsTS folders. See the Extensions intro page for more information.

Hierarchy

The NonRealtimeDraggingTool class lets the user drag an image instead of actually moving any selected nodes, until the mouse-up event.

If you want to experiment with this extension, try the Non Realtime Dragging sample.

Index

Methods

Override computeEffectiveCollection

  • Call the base method, and then make an image of the returned collection, show it using a Picture, and hold the Picture in a temporary Part, as _imagePart.

    Parameters

    Returns Map<Part, DraggingInfo>

Override doActivate

  • doActivate(): void
  • When activated, replace the draggedParts with the ghost dragged parts, which consists of just one Part, the image, added to the Diagram at the current mouse point.

    Returns void

Override doDeactivate

  • doDeactivate(): void
  • When deactivated, make sure any image is removed from the Diagram and all references are cleared out.

    Returns void

Override doKeyDown

  • doKeyDown(): void
  • If the user changes to "copying" mode by holding down the Control key, return to the regular behavior and remove the image.

    Returns void

Override doKeyUp

  • doKeyUp(): void
  • If the user changes back to "moving" mode, show the image again and go back to dragging the ghost dragged parts.

    Returns void

Override doMouseUp

  • doMouseUp(): void
  • Do the normal mouse-up behavior, but only after restoring draggedParts.

    Returns void