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
See the Extensions intro page for more information.
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.
Constructs a RotateMultipleTool and sets the name for the tool.
Rotation point of selection
Initial angle when rotating as a whole
Holds references to all selected non-Link Parts and their offset & angles
Calculate the desired angle with different rotation points, depending on whether we are rotating the whole selection as one, or Parts individually.
in document coordinates
Calls RotatingTool.doActivate, and then remembers the center point of the collection, and the initial distances and angles of selected parts to the center.
Clean up any references to Parts.
Rotate all selected objects about their collective center. When the control key is held down while rotating, all selected objects are rotated individually.