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
  - RotatingTool
    - RotateMultipleTool

The RotateMultipleTool class lets the user rotate multiple objects at a time. When more than one part is selected, rotates all parts, revolving them about their collective center. If the control key is held down during rotation, rotates all parts individually.

Caution: this only works for Groups that do not have a Placeholder.

If you want to experiment with this extension, try the Rotate Multiple sample.

## Index

### Constructors

- constructor

### Methods

- computeRotate
- doActivate
- doDeactivate
- rotate

## Inherited Members

### Properties

- RotatingTool.adornedObject
- RotatingTool.handle
- RotatingTool.handleAngle
- RotatingTool.handleArchetype
- RotatingTool.handleDistance
- RotatingTool.originalAngle
- RotatingTool.rotationPoint
- RotatingTool.snapAngleEpsilon
- RotatingTool.snapAngleMultiple
- Tool.diagram
- Tool.isActive
- Tool.isEnabled
- Tool.name
- Tool.transactionResult

### Methods

- RotatingTool.canStart
- RotatingTool.computeRotationPoint
- RotatingTool.doCancel
- RotatingTool.doMouseMove
- RotatingTool.doMouseUp
- RotatingTool.stopTransaction
- RotatingTool.updateAdornments
- Tool.canStartMultiTouch
- Tool.cancelWaitAfter
- Tool.doKeyDown
- Tool.doKeyUp
- Tool.doMouseDown
- Tool.doMouseWheel
- Tool.doStart
- Tool.doStop
- Tool.doWaitAfter
- Tool.findToolHandleAt
- Tool.isBeyondDragSize
- Tool.standardMouseClick
- Tool.standardMouseOver
- Tool.standardMouseSelect
- Tool.standardMouseWheel
- Tool.standardPinchZoomMove
- Tool.standardPinchZoomStart
- Tool.standardWaitAfter
- Tool.startTransaction
- Tool.stopTool

## Constructors

### constructor

- new RotateMultipleTool(): RotateMultipleTool

- Constructs a RotateMultipleTool and sets the name for the tool.

  #### Returns RotateMultipleTool

## Methods

### Override computeRotate

- computeRotate(newPoint: Point): number

- Calculate the desired angle with different rotation points, depending on whether we are rotating the whole selection as one, or Parts individually.

  #### Parameters

  - ##### newPoint: Point

    in document coordinates

  #### Returns number

### Override doActivate

- doActivate(): void

- Calls RotatingTool.doActivate, and then remembers the center point of the collection, and the initial distances and angles of selected parts to the center.

  #### Returns void

### Override doDeactivate

- doDeactivate(): void

- Clean up any references to Parts.

  #### Returns void

### Override rotate

- rotate(newangle: number): void

- Rotate all selected objects about their collective center. When the control key is held down while rotating, all selected objects are rotated individually.

  #### Parameters

  - ##### newangle: number

  #### Returns void

Copyright © 1998-2022 by Northwoods Software Corporation.