RotatingTool$Typings extension
- on
Properties
- adornedObject ↔ GraphObject?
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets the GraphObject that is being rotated. This may be the same object as the selected Part or it may be contained within that Part.getter/setter pair - handle ↔ GraphObject?
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
This read-only property returns the GraphObject that is the tool handle being dragged by the user. This will be contained by an Adornment whose category is "RotatingTool". Its Adornment#adornedObject is the same as the #adornedObject.getter/setter pair - handleAngle ↔ num
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets the spot to locate the Adornment for the rotation handle when it does not have a Placeholder. This assumes the Adornment's location will be at the center of the rotation handle.getter/setter pair - handleArchetype ↔ GraphObject?
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets a small GraphObject that is copied as a rotation handle for the selected part. By default this is a Shape that is a small yellow circle. Setting this property does not raise any events.getter/setter pair - handleDistance ↔ num
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets the spot to locate the Adornment at a particular distance from the #adornedObject. This assumes the Adornment's location will be at the center of the rotation handle.getter/setter pair - originalAngle ↔ num
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
This read-only property returns the angle that was the original value of the GraphObject#angle of the GraphObject that is being rotated. The value is invalid when this tool is not active.getter/setter pair - rotationPoint ↔ Point
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets the Point at which the axis of the rotation should be. #doActivate saves here the value returned by the call to #computeRotationPoint. The value is invalid when this tool is not active.getter/setter pair - snapAngleEpsilon ↔ num
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets the the closeness to a desired angle at which the angle is "snapped to".getter/setter pair - snapAngleMultiple ↔ num
-
Available on RotatingTool, provided by the RotatingTool$Typings extension
Gets or sets the preferred angles for the selected object.getter/setter pair
Methods
-
canStart(
) → bool -
Available on RotatingTool, provided by the RotatingTool$Typings extension
This tool may run when there is a mouse-down event on a rotate handle, the diagram is not read-only and it allows rotation, the left mouse button is being used, and this tool's adornment's rotate handle is at the current mouse point. -
computeRotate(
Point newPoint) → num -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Compute the new angle given a point. If the Shift key is pressed, this method ignores the #snapAngleMultiple and #snapAngleEpsilon. -
computeRotationPoint(
GraphObject obj) → Point -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Compute the Point about which things should rotate. This is called when this tool is activated and sometimes when updating the Adornment. The value of the call is remembered as #rotationPoint. @expose @param {GraphObject} obj the Part#rotateObject @return {Point} -
doActivate(
) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Capture the mouse, remember the original GraphObject#angle, and start a transaction. -
doCancel(
) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Restore the original GraphObject#angle of the adorned object. -
doDeactivate(
) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Stop the current transaction, forget the #handle and #adornedObject, and release the mouse. -
doMouseMove(
) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Call #rotate with a new angle determined by the current mouse point. This determines the new angle by calling #computeRotate. -
doMouseUp(
) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Call #rotate with an angle based on the most recent mouse point, commit the transaction, and raise the "PartRotated" DiagramEvent. -
makeAdornment(
GraphObject rotateObj) → Adornment? -
Available on RotatingTool, provided by the RotatingTool$Typings extension
(undocumented) Create and return an Adornment that lets the user grab a handle to rotate an object in the selected part. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {GraphObject} rotateObj the GraphObject being rotated. @return {Adornment} -
rotate(
num newangle) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Change the angle of the selected part's Part#rotateObject. This modifies its GraphObject#angle. -
stopTransaction(
) → bool -
Available on RotatingTool, provided by the RotatingTool$Typings extension
This calls the super Tool#stopTransaction method, and if the result istrue
, attempts to optimize the transaction by removing all changes except the first and last by calling Transaction#optimize. -
updateAdornments(
Part part) → void -
Available on RotatingTool, provided by the RotatingTool$Typings extension
Show an Adornment with a rotate handle at a point to the side of the adorned object if the part is selected and visible and if Part#canRotate() is true.