commands#
Interfaces#
DeleteQuestion#
Defined in: arranger/src/commands.ts:509
What a deletion asks first: it also deletes virtual timelines made from what it names, and the user chooses between deleting them all and hiding instead, or, where core would refuse to delete them all, learns why and may only hide instead.
Properties#
hide#
readonlyhide:SetCommand|StyleCommand|null
Defined in: arranger/src/commands.ts:528
“Hide instead”, which removes nothing: the set hiding the cards of
the targets where every one is a virtual timeline whose card its block
holds (hideCommand), the style hiding the one target where it is a
root timeline (rootDisplayCommand); else null.
question#
readonlyquestion:string
Defined in: arranger/src/commands.ts:516
The question: what is deleted, and every virtual timeline it takes
along, each by its kind and its name, else its ID (addressWords);
where core refuses “Delete all”, that they cannot all be deleted and
core’s reason.
remove#
readonlyremove:RemoveCommand|null
Defined in: arranger/src/commands.ts:521
“Delete all”: the remove naming those virtual timelines as well;
null where core refuses it, so it is not offered.
Move#
Defined in: arranger/src/commands.ts:42
A block’s node position after a gesture, before quantization.
Properties#
id#
readonlyid:string
Defined in: arranger/src/commands.ts:43
x#
readonlyx:number
Defined in: arranger/src/commands.ts:44
y#
readonlyy:number
Defined in: arranger/src/commands.ts:45
Visible#
Defined in: arranger/src/commands.ts:128
The visible part of the canvas: Svelte Flow’s transform and the pane’s size in screen pixels.
Properties#
height#
readonlyheight:number
Defined in: arranger/src/commands.ts:133
width#
readonlywidth:number
Defined in: arranger/src/commands.ts:132
x#
readonlyx:number
Defined in: arranger/src/commands.ts:129
y#
readonlyy:number
Defined in: arranger/src/commands.ts:130
zoom#
readonlyzoom:number
Defined in: arranger/src/commands.ts:131
Type Aliases#
ZOrderAction#
ZOrderAction =
"front"|"back"|"forward"|"backward"
Defined in: arranger/src/commands.ts:220
A change of stacking order: to the front or back, or one step forward or backward.
Functions#
addCommand()#
addCommand(
view,id,manifest,visible,metrics,pane?):AddCommand
Defined in: arranger/src/commands.ts:180
One add of a new block id holding manifest, its top-left at the
centre of what visible shows, quantized as a move under the view’s grid
is, then moved right past every block it would overlap: while its node
rectangle (its drawing at the workspace’s block defaults) meets a root
block’s grown by the grid size on every side, its node moves to the right
edge of the rightmost such block plus the grid size, its x rounded up
to the position step. Its y never changes; its other placement members
are the workspace’s block defaults.
Parameters#
view#
id#
string
manifest#
visible#
metrics#
FontMetrics
pane?#
Returns#
deleteQuestion()#
deleteQuestion(
view,command):DeleteQuestion|null
Defined in: arranger/src/commands.ts:577
The question command asks before it is stored, where removing its
targets also removes virtual timelines it does not name (core’s
removedBy: those made from a removed timeline or virtual timeline, or
through a removed FlowMap, at any depth); null where it removes none,
and for the virtual timelines of a block removed whole. Core refuses to
remove a virtual timeline another one left is made from, so “Delete all”
names each of them, after the targets, in each block’s order of its
virtual timelines. That remove is previewed with core (preview),
never checked by a copy of its rules: where core refuses it (a FlowMap
left names one of them as a chunk), the question says so in core’s
words and offers only hiding instead, where hiding is possible.
Parameters#
view#
command#
Returns#
DeleteQuestion | null
hideCommand()#
hideCommand(
view,targets):SetCommand
Defined in: arranger/src/commands.ts:358
The set hiding the cards of the virtual timelines targets (each
{block, id: V}, its card held by its block): every member of each one’s
stated place unstated, the virtual timeline kept. Only a virtual
timeline’s card is hidden so: a root’s card is drawn whether its place is
stated or not, so a rule hides it (rootDisplayCommand), and a member’s
card in its frame has no place of its own.
Parameters#
view#
targets#
readonly Address[]
Returns#
moveCommand()#
moveCommand(
view,moves,metrics,pane?):SetCommand|null
Defined in: arranger/src/commands.ts:92
One set placing every moved block where its node is dropped, moves
holding node positions (the block’s top-left corner, nodePosition): each
quantized to GRID_FREE and stored as the position of the block’s place
origin, in the order of moves; a block whose stored position does not
change is left out, and null is returned when nothing is left. Snapping
is snap’s job: the caller passes the dragged node’s snapped position,
and the other nodes of the drag moved by the same delta.
Parameters#
view#
moves#
readonly Move[]
metrics#
FontMetrics
pane?#
Returns#
SetCommand | null
nudgeCommand()#
nudgeCommand(
view,ids,dx,dy,metrics,pane?):SetCommand|null
Defined in: arranger/src/commands.ts:107
One set moving the blocks ids by dx, dy grid steps: each node’s
position moved and quantized to the grid when it snaps, otherwise to
GRID_FREE, then stored as the position of its place origin. null when
nothing moves.
Parameters#
view#
ids#
readonly string[]
dx#
number
dy#
number
metrics#
FontMetrics
pane?#
Returns#
SetCommand | null
removeCommand()#
removeCommand(
view,selection,editing):SetCommand|RemoveCommand| {refused:string; }
Defined in: arranger/src/commands.ts:443
What Delete stores for the selected addresses: one remove, an
element’s part or card standing for the element whose ID it carries, or
one set hiding the selected virtual cards. Every element can be
removed, timelines and groups included; a selection holding a manifest’s
title, which goes only with its block, is refused whole, with a hint
naming the block. A band is never removed: its address is left out, and a
selection of bands alone is refused with a hint. Nor is a flow-control
element, which is rejected through its provenance and never deleted, nor
a chunk of a virtual timeline or of a switched card, which is changed in
its FlowMap: their addresses, or those of their parts, are left out, and
a selection that names nothing else is refused with a hint. A selected
virtual card held by its block is hidden: its place is unstated (core’s
set of place with every stated member null) and its virtual timeline
kept, which only a remove of the virtual timeline’s own address
deletes (the Properties tab’s “Delete virtual timeline”); a virtual card
in a frame is left out with a hint, and a selection hiding virtual cards
and deleting anything else is refused with a hint. Whether a segment may
go is core’s to decide: one that would leave a gap in its segment line is
refused there (segment_not_removable), and the canvas shows that
refusal as it shows every refusal of the store. Inside an editor the
edited element is never removed, a part of it standing for it as well:
it is left out of the targets, and a selection that names nothing else
is refused with a hint to close the editor first. A remove that also
takes along virtual timelines made from what it names is asked about
before it is stored (deleteQuestion).
Parameters#
view#
selection#
editing#
Editing | null
Returns#
SetCommand | RemoveCommand | { refused: string; }
rootDisplayCommand()#
rootDisplayCommand(
block,root,hidden):StyleCommand
Defined in: arranger/src/commands.ts:396
The style hiding the root timeline root of the block block
(display: none on rootSelector’s addresses), or, with hidden
false, removing that rule, so the root is drawn again. Its card keeps
its place while hidden (section 8.4); a member of a group lying inside
the root is drawn by its frame and stays, without the root’s ancestor
line, and the ancestor cards of the root behind frames are not drawn.
Parameters#
block#
string
root#
string
Returns#
zOrderCommand()#
zOrderCommand(
view,ids,action):SetCommand|null
Defined in: arranger/src/commands.ts:265
One set of index raising or lowering the blocks ids among their
siblings: to the front or back, or one step past their unchosen
neighbour. Only the chosen blocks get new fractional indices, each run of
them between its unchosen neighbours and below every index a chosen block
holds there. null when the order is unchanged.
Parameters#
view#
ids#
readonly string[]
action#
Returns#
SetCommand | null