selection#
Interfaces#
SelectedBand#
Defined in: arranger/src/selection.ts:57
A selected band: its block, its timeline and its facet.
Properties#
block#
readonlyblock:string
Defined in: arranger/src/selection.ts:58
facet#
readonlyfacet:Facet
Defined in: arranger/src/selection.ts:60
timeline#
readonlytimeline:string
Defined in: arranger/src/selection.ts:59
Type Aliases#
Selection#
Selection =
ReadonlyMap<string,Address>
Defined in: arranger/src/selection.ts:21
The selected addresses of blocks and of their elements, parts and bands
(drawing.md section 2.2), each under its key (addressKey): an address
is selected once, however its object was built.
Variables#
NOTHING_SELECTED#
constNOTHING_SELECTED:Selection
Defined in: arranger/src/selection.ts:29
The empty selection.
Functions#
blockOf()#
blockOf(
address):string
Defined in: arranger/src/selection.ts:37
The block an address lies in.
Parameters#
address#
Returns#
string
click()#
click(
selection,address,additive):Selection
Defined in: arranger/src/selection.ts:47
The selection after a click that selects address (what a press hit
selects is boxes.ts’s pressSelection): that address alone, or, when
additive, the selection with that address toggled. A click on an element
selects the element only, never its block.
Parameters#
selection#
address#
additive#
boolean
Returns#
editedSelection()#
editedSelection(
view,editing):Selection
Defined in: arranger/src/selection.ts:136
What the selection holds once editing has opened in view: the edited
element, by the address a click on its box selects: the block for the
bundle editor, the group for the group editor (a press on its frame
selects the group), and for the timeline editor the timeline’s cards
where it is drawn in a card (every card of a member of several groups
shares one address), else the timeline (a child, which has no card, is
selected by its line).
Parameters#
view#
editing#
Returns#
existing()#
existing(
view,selection,editing):Selection
Defined in: arranger/src/selection.ts:111
The addresses of selection that view keeps under editing, the
innermost open editor (null on the arranger): each must name something
(core’s resolveAddress; the title only of a named manifest, the one
whose title is drawn), a band only where the view offers it
(offersBand), and, in an editor, lie inside the edited element: in the
bundle editor its block or anything of it, in a group or timeline editor
what that group or timeline contains (core’s contains), the edited
element itself and its cards included, never another block. The one rule
for what a selection keeps, after a change, an undo or a redo and when an
editor closes, so a change keeps every address that still names something
inside the edited element, and closing an editor drops every band but
those of the timeline then edited. The selection itself when nothing is
gone, so an unchanged selection keeps its identity.
Parameters#
view#
selection#
editing#
Editing | null
Returns#
isSelected()#
isSelected(
selection,address):boolean
Defined in: arranger/src/selection.ts:32
Whether selection holds address.
Parameters#
selection#
address#
Returns#
boolean
offersBand()#
offersBand(
view,band,editing):boolean
Defined in: arranger/src/selection.ts:87
Whether view under editing, the innermost open editor (null on the
arranger), offers the selected band: its timeline exists in its block
and is the one whose bands that block offers (bandTimelineOf). The one
rule for keeping a selected band, whether the selection is pruned
(existing) or a band is stepped.
Parameters#
view#
band#
editing#
Editing | null
Returns#
boolean
selectedBand()#
selectedBand(
view,address):SelectedBand|null
Defined in: arranger/src/selection.ts:75
The band the selected address names in view (core’s resolveAddress),
its block, timeline and facet; null for any other address, and for one
that names nothing.
Parameters#
view#
address#
Returns#
SelectedBand | null
selectionOf()#
selectionOf(
addresses):Selection
Defined in: arranger/src/selection.ts:24
The selection holding addresses, each once.
Parameters#
addresses#
Iterable<Address>