This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the `extensions` (for loading via script tags),`extensionsTS` (UMD modules), or `extensionsJSM` (ES6 modules) folders. See the Extensions intro page for more information.

### Hierarchy

- Tool
  - DraggingTool
    - NonRealtimeDraggingTool

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

### Constructors

- constructor

### Properties

- duration

### Methods

- computeEffectiveCollection
- doActivate
- doDeactivate
- doKeyDown
- doKeyUp
- doMouseUp

## Inherited Members

### Properties

- DraggingTool.copiedParts
- DraggingTool.copiesEffectiveCollection
- DraggingTool.copyCursor
- DraggingTool.currentPart
- DraggingTool.delay
- DraggingTool.dragOptions
- DraggingTool.draggedParts
- DraggingTool.dragsLink
- DraggingTool.dragsTree
- DraggingTool.gridSnapCellSize
- DraggingTool.gridSnapCellSpot
- DraggingTool.gridSnapOrigin
- DraggingTool.isComplexRoutingRealtime
- DraggingTool.isCopyEnabled
- DraggingTool.isGridSnapEnabled
- DraggingTool.isGridSnapRealtime
- DraggingTool.moveCursor
- DraggingTool.nodropCursor
- DraggingTool.startPoint
- Tool.diagram
- Tool.isActive
- Tool.isEnabled
- Tool.name
- Tool.transactionResult

### Methods

- DraggingTool.canStart
- DraggingTool.computeMove
- DraggingTool.doCancel
- DraggingTool.doDragOver
- DraggingTool.doDropOnto
- DraggingTool.doMouseMove
- DraggingTool.findDraggablePart
- DraggingTool.mayCopy
- DraggingTool.mayMove
- DraggingTool.moveParts
- DraggingTool.standardMouseSelect
- DraggingTool.stopTransaction
- Tool.canStartMultiTouch
- Tool.cancelWaitAfter
- Tool.doMouseDown
- Tool.doMouseWheel
- Tool.doStart
- Tool.doStop
- Tool.doWaitAfter
- Tool.findToolHandleAt
- Tool.isBeyondDragSize
- Tool.standardMouseClick
- Tool.standardMouseOver
- Tool.standardMouseWheel
- Tool.standardPinchZoomMove
- Tool.standardPinchZoomStart
- Tool.standardWaitAfter
- Tool.startTransaction
- Tool.stopTool
- Tool.updateAdornments

## Constructors

### constructor

- new NonRealtimeDraggingTool(): NonRealtimeDraggingTool

- You do not normally need to create an instance of this tool because one already exists as the ToolManager.draggingTool, which you can modify.

  The Tool.name of this tool is "Dragging".

  #### Returns NonRealtimeDraggingTool

## Properties

### duration: number

- Gets or sets how long the movement animation should be to move the actual parts upon a mouse-up. The default value is zero -- there is no animation of the movement.

## Methods

### Override computeEffectiveCollection

- computeEffectiveCollection(coll: Iterable<Part>): Map<Part, DraggingInfo>

- 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

  - ##### coll: Iterable<Part>

  #### 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

Copyright © 1998-2022 by Northwoods Software Corporation.