gestures/resize#
Interfaces#
ResizeHost#
Defined in: arranger/src/gestures/resize.ts:15
The resize toolbar’s side of a resize.
Properties#
actions#
readonlyactions:NodeActions
Defined in: arranger/src/gestures/resize.ts:16
Methods#
autoPan()#
autoPan(
screen):Promise<boolean>
Defined in: arranger/src/gestures/resize.ts:30
Pan the canvas at Svelte Flow’s auto-pan speed when the client point
screen lies in the pane’s edge band; whether it panned.
Parameters#
screen#
Returns#
Promise<boolean>
level()#
level():
Level
Defined in: arranger/src/gestures/resize.ts:20
The level the resize is made at.
Returns#
locked()#
locked():
boolean
Defined in: arranger/src/gestures/resize.ts:24
Whether the toolbar takes no resize: the canvas is locked or read-only.
Returns#
boolean
mode()#
mode():
ResizeMode|undefined
Defined in: arranger/src/gestures/resize.ts:22
The mode the toolbar shows; undefined where it offers none.
Returns#
ResizeMode | undefined
target()#
target():
object
Defined in: arranger/src/gestures/resize.ts:18
The block resized, as stored, and the box of its drawing resized: its own box, a frame or a card.
Returns#
object
block#
readonlyblock:Block
box#
readonlybox:DrawnBox
viewport()#
viewport():
Viewport
Defined in: arranger/src/gestures/resize.ts:25
Returns#
Viewport
ResizePress#
Defined in: arranger/src/gestures/resize.ts:34
What a press on a handle holds.
Properties#
block#
readonlyblock:Block
Defined in: arranger/src/gestures/resize.ts:37
box#
readonlybox:DrawnBox
Defined in: arranger/src/gestures/resize.ts:38
frame#
frame:
number|null
Defined in: arranger/src/gestures/resize.ts:47
The animation frame of the auto-pan, while the resize is under way.
last#
last:
Point
Defined in: arranger/src/gestures/resize.ts:45
The pointer’s last client point, which the auto-pan reads again after each pan.
level#
readonlylevel:Level
Defined in: arranger/src/gestures/resize.ts:39
mode#
readonlymode:ResizeMode
Defined in: arranger/src/gestures/resize.ts:40
pan#
readonlypan:Point
Defined in: arranger/src/gestures/resize.ts:43
screen#
readonlyscreen:Point
Defined in: arranger/src/gestures/resize.ts:42
The pointer’s client point at the press, and the viewport’s pan then.
view#
readonlyview:View
Defined in: arranger/src/gestures/resize.ts:36
The view as stored at the press, which the command is built on.
Functions#
resizeGesture()#
resizeGesture(
host,handle):GestureStrategy<ResizePress,Delta>
Defined in: arranger/src/gestures/resize.ts:60
The resize by handle: the pointer’s travel in canvas units (its screen
travel less the viewport’s pan since the press, over the zoom) is the
resize’s delta. A block becomes new placement values (resize), a frame
or a card new places (itemResizeValues); the release stores them in one
set, nothing when every value is stored already. While the pointer
lies in the pane’s edge band the canvas pans every frame, and the
preview follows the canvas point under the pointer, as Svelte Flow does
for a node drag.