@fabwcie/free-drawing / utils/arrowHandle
utils/arrowHandle
Classes
ArrowHandle
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:28
Handle of a selected curved or elbow arrow, in the selection layer: dragged, it bends the curve on either side (bend attribute) or moves the middle segment of the elbow arrow (elbowMid), the arrow routed again at once. Shown for one arrow selected alone (with its label) with the selection tool, not locked nor in read only; placed again each time the drawing is drawn (moves, zoom, changes...), not exported
Constructors
Constructor
new ArrowHandle(
drawer):ArrowHandle
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:42
Handle following the selection and the drawing
Parameters
drawer
Drawer whose selected arrow gets a handle
Returns
Properties
drawer
drawer:
Drawer
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:30
Drawer whose selected arrow gets a handle
Methods
_cursor()
private_cursor():string
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:154
Cursor over the handle: along the move of the middle segment of an elbow arrow, else a grab hand
Returns
string
Css cursor
_drag()
private_drag(handle):void
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:188
Handle dragged: curve bent through it (its distance from the straight line), middle segment of an elbow arrow moved to it, arrow routed again, labels on its middle, shown to collaborators
Parameters
handle
Circle
Dragged handle
Returns
void
_getArrow()
private_getArrow():Arrow|null
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:53
Arrow getting a handle: one curved or elbow arrow selected (with its labels), selection tool, not locked nor read only, not moved nor transformed
Returns
Arrow | null
Selected arrow, null without
_getHandle()
private_getHandle():Circle
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:108
Handle node in the selection layer, created once (again when the selection layer was emptied)
Returns
Circle
Handle
_startDrag()
private_startDrag():void
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:165
Drag started: axis of the middle segment of an elbow arrow and its place on the automatic path (snapped to)
Returns
void
update()
update():
void
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:80
Handle shown at the middle of the selected arrow (middle point of a curve, middle segment of an elbow arrow), else hidden
Returns
void
Variables
arrowHandleName
constarrowHandleName:"drawer-arrow-handle"='drawer-arrow-handle'
Defined in: packages/free-drawing/src/utils/arrowHandle.ts:14
Name of the handle of the selected arrow, in the selection layer