boxes#
Interfaces#
AffordanceSource#
Defined in: arranger/src/boxes.ts:49
What an affordance of the canvas stands for: a named timestamp the
drawing draws nothing of (affordancesOf), shown by the canvas alone, so
it names no element of the drawing, only the timestamp’s address.
Extended by#
Properties#
address#
readonlyaddress:ElementAddress
Defined in: arranger/src/boxes.ts:52
The named timestamp’s address {id}.
kind#
readonlykind:"affordance"
Defined in: arranger/src/boxes.ts:50
DrawingPoint#
Defined in: arranger/src/boxes.ts:260
A point in a drawing’s own units.
Properties#
x#
readonlyx:number
Defined in: arranger/src/boxes.ts:261
y#
readonlyy:number
Defined in: arranger/src/boxes.ts:262
Hit#
Defined in: arranger/src/boxes.ts:269
What a pointer target hits in block block.
Properties#
address#
readonlyaddress:Address
Defined in: arranger/src/boxes.ts:274
{block} for the block itself, else the address of the element in the block.
block#
readonlyblock:string
Defined in: arranger/src/boxes.ts:270
boundary#
readonlyboundary:boolean
Defined in: arranger/src/boxes.ts:278
Whether the target is a segment’s boundary line.
box#
readonlybox:DrawnBox|null
Defined in: arranger/src/boxes.ts:276
The container hit: the block, a frame, a card or a band; null for an element.
kind#
readonlykind:"block"|"frame"|"card"|"band"|"element"
Defined in: arranger/src/boxes.ts:272
A container’s kind, or "element" for anything else drawn.
within#
readonlywithin:DrawnBox|null
Defined in: arranger/src/boxes.ts:283
The displayed frame or card on top at the point (boxAt); null
outside every one, or when no point was given.
Holding#
Defined in: arranger/src/boxes.ts:307
The boxes holding part of a selection: the block itself, and its frames and cards by boxKey.
Properties#
block#
readonlyblock:boolean
Defined in: arranger/src/boxes.ts:308
boxes#
readonlyboxes:ReadonlySet<string>
Defined in: arranger/src/boxes.ts:309
Hover#
Defined in: arranger/src/boxes.ts:293
What the pointer highlights in a block, held by strings so that a redraw
keeps it: a box by its place key (boxKey), a boundary and a band by
their addresses’ keys (addressKey), a band also by the place key of the
card holding it, so that of the cards of one timeline only the one under
the pointer shows its band.
Properties#
band#
readonlyband:string|null
Defined in: arranger/src/boxes.ts:298
The band the pointer is on (bandUnder), in every view.
bandHolder#
readonlybandHolder:string|null
Defined in: arranger/src/boxes.ts:300
The place key (placeKeyText) of the card holding that band; null without one.
boundary#
readonlyboundary:string|null
Defined in: arranger/src/boxes.ts:296
box#
readonlybox:string|null
Defined in: arranger/src/boxes.ts:295
A card or a frame. The block itself is never marked: its node shows it.
Stacking#
Defined in: arranger/src/boxes.ts:156
The order a block node shows its drawing in, from bottom to top, with the
ancestor cards of the root raised raised (raisedRoot, else null):
the ancestor cards that are not raised (docs/drawing.md in TimeToShare,
section 8.8, in record order, a later one over an earlier one), then
every other frame and card (one level: a member’s card lies in its
frame, and items laid over one another by the user cover nothing here),
then the raised ancestor cards, in record order. The one statement of
that order: the block node draws by it (raisedLayers), the pointer and
every place of a coordinate read lines by covered, the marquee and an
editor’s focus leave out what lies behind.
Properties#
above#
readonlyabove: (index) =>boolean
Defined in: arranger/src/boxes.ts:170
Whether the element at an index of drawing.elements lies in a raised card.
Parameters#
index#
number
Returns#
boolean
behind#
readonlybehind: (index) =>boolean
Defined in: arranger/src/boxes.ts:168
Whether the element at an index of drawing.elements lies in an ancestor card below the frames.
Parameters#
index#
number
Returns#
boolean
covered#
readonlycovered:Covered
Defined in: arranger/src/boxes.ts:166
Whether a line is covered at a point: a displayed frame or card of a higher rank holds the point.
coveredElement#
readonlycoveredElement: (index,point) =>boolean
Defined in: arranger/src/boxes.ts:175
Whether the element at an index of drawing.elements is covered at a point: a displayed
frame or card of a higher rank than the card drawing it holds the point.
Parameters#
index#
number
point#
Returns#
boolean
lifted#
readonlylifted: (axis) =>boolean
Defined in: arranger/src/boxes.ts:162
Whether a line lies in a raised card, above every frame.
Parameters#
axis#
Returns#
boolean
raised#
readonlyraised:string|null
Defined in: arranger/src/boxes.ts:158
The root whose ancestor cards are raised, else null.
rankOf#
readonlyrankOf: (axis) =>number
Defined in: arranger/src/boxes.ts:160
How high a line lies: the rank of the card drawing it.
Parameters#
axis#
Returns#
number
sunk#
readonlysunk: (axis) =>boolean
Defined in: arranger/src/boxes.ts:164
Whether a line lies in an ancestor card below the frames.
Parameters#
axis#
Returns#
boolean
Type Aliases#
BandBox#
BandBox =
DrawnBox&object
Defined in: arranger/src/boxes.ts:77
A band of a timeline drawn with a line of its own.
Type Declaration#
band#
readonlyband:NonNullable<DrawnBox["band"]>
kind#
readonlykind:"band"
CanvasSource#
CanvasSource =
DescriptorSource|AffordanceSource
Defined in: arranger/src/boxes.ts:56
What an element of a block node draws: a descriptor of the drawing, or an affordance.
CardBox#
CardBox =
DrawnBox&object
Defined in: arranger/src/boxes.ts:70
Any card, an item of the block or held by a frame.
Type Declaration#
card#
readonlycard:NonNullable<DrawnBox["card"]>
key#
readonlykey:PlaceKey
kind#
readonlykind:"card"
Covered#
Covered = (
axis,point) =>boolean
Defined in: arranger/src/boxes.ts:142
Whether a line of a drawing is covered at a point (block-local canvas units): a box stacked above it holds the point.
Parameters#
axis#
point#
Returns#
boolean
ItemBox#
ItemBox =
DrawnBox&object
Defined in: arranger/src/boxes.ts:64
A frame or a block-held card: a box placed freely in the block.
Type Declaration#
item#
readonlyitem:NonNullable<DrawnBox["item"]>
key#
readonlykey:PlaceKey
Role#
Role =
ContainerKind|"shadow"|"boundary"|"element"
Defined in: arranger/src/boxes.ts:266
What a descriptor draws, as the pointer and the marks read it.
Variables#
NO_HOVER#
constNO_HOVER:Hover
Defined in: arranger/src/boxes.ts:304
Nothing highlighted.
Functions#
bandAt()#
bandAt(
drawing,timeline,point):BandBox|null
Defined in: arranger/src/boxes.ts:577
The offered band of timeline whose rectangle, its edges included, holds
point (in the drawing’s units), the first in drawing order, else null.
A band 0 high holds the points of its edge only. A drawn element is hit
before any band: the caller asks only where the press hit no element.
Parameters#
drawing#
timeline#
string
point#
Returns#
BandBox | null
bandUnder()#
bandUnder(
drawing,hit,point,editing):BandBox|null
Defined in: arranger/src/boxes.ts:763
The band the pointer is on at point (in the drawing’s units) of block
hit.block, drawn as drawing, as the pointer highlights it and as a
double-click opens it, in every view, where hit is no drawn element (an
element is hit before any band): in the timeline editor of one of the
block’s timelines (bandTimelineOf) the band hit (hitOf), the one a
click selects; elsewhere, of the bands held by the card under the point
(the displayed card on top, hit.within, else the card hit) the last in
drawing order whose rectangle holds the point, so a child’s band before
the band of its parent holding the child’s line. null on an element,
where no band holds the point, and on a frame, an ancestor card (which
offers no band) or the block. Whether the press lies inside the edited
element is the caller’s test.
Parameters#
drawing#
hit#
point#
editing#
Editing | null
Returns#
BandBox | null
blockBox()#
blockBox(
drawing):DrawnBox|undefined
Defined in: arranger/src/boxes.ts:426
The block’s own record, the first of drawing.boxes.
Parameters#
drawing#
Returns#
DrawnBox | undefined
boxAt()#
boxAt(
drawing,point,kinds?):DrawnBox|null
Defined in: arranger/src/boxes.ts:492
The last displayed container of kinds (frames and cards unless named)
whose rectangle holds point, edges included: the one drawn on top, since
a frame is drawn before its cards and items that overlap are drawn in item
order; null where none does. A frame or card that is not displayed holds
no point.
Parameters#
drawing#
point#
kinds?#
readonly ("block" | "frame" | "card" | "band")[] = ...
Returns#
DrawnBox | null
boxKey()#
boxKey(
box):string|null
Defined in: arranger/src/boxes.ts:255
The one string form of a frame’s or card’s identity, its place key’s (placeKeyText).
Parameters#
box#
Returns#
string | null
boxOf()#
boxOf(
drawing,address):DrawnBox|undefined
Defined in: arranger/src/boxes.ts:389
The container of drawing at the element address address, its first
record (a timeline drawn at two lines has two records of each band, and a
member of several groups a card in each frame); the block for the
bundle’s address {}; undefined where no container has it.
Parameters#
drawing#
address#
Returns#
DrawnBox | undefined
contentCountOf()#
contentCountOf(
box):number
Defined in: arranger/src/boxes.ts:468
The number of contents of the container box (docs/drawing.md in
TimeToShare, section 1) as layout records it: a block’s items, a frame’s
cards, a card’s rows and bands; a band has none.
Parameters#
box#
Returns#
number
hitForAddress()#
hitForAddress(
block,drawing,address,editing?):Hit|null
Defined in: arranger/src/boxes.ts:660
The hit of the selected address of block block as Enter reads it,
from the drawing alone, with no point: the block itself for the block,
a displayed frame or card for its address (for the cards of a member of
several groups the one in the frame editing works in, workedBox, else
the first displayed, so a hidden card never hides a shown one), else the
first element drawn with that address; null when nothing draws it
(another block’s address, a band, a box that is not displayed, an
element not drawn).
Parameters#
block#
string
drawing#
address#
editing?#
Editing | null = null
Returns#
Hit | null
hitOf()#
hitOf(
block,drawing,source,point?,editing?):Hit
Defined in: arranger/src/boxes.ts:603
What the element of source source hits in block block, drawn as
drawing: the frame or card a descriptor draws (its rectangle, or a
card’s shadow), else the element it draws, classified by the drawing’s
containers; for an affordance the element of its address, the named
timestamp (no box, no boundary); the block itself where nothing carrying
an element’s address is hit (source null, or the block’s background).
With point (in the drawing’s units), also the displayed frame or card
on top under it (boxAt).
A band is hit only in the timeline editor of its timeline, when editing,
the innermost open editor, is that editor in this block
(bandTimelineOf): where the hit is a container (the block, a frame, a
card), the band of the edited timeline whose rectangle holds
point (bandAt) is hit instead, so a drawn element is always hit before
a band.
Parameters#
block#
string
drawing#
source#
CanvasSource | null
point?#
editing?#
Editing | null = null
Returns#
holdingOf()#
holdingOf(
drawing,selected):Holding
Defined in: arranger/src/boxes.ts:799
The boxes of drawing holding part of the selection selected (element
addresses by their keys, as the descriptors carry them): a displayed frame or card holds
the selection when an element of its range (DrawnBox.range) carries a
selected address, the box itself excepted. A card holds its member
drawing, its timeline and everything drawn with it; a frame its title, its
members’ cards and what they hold; the block’s own box every drawn
element. Where a box lies plays no part, so items that overlap change
nothing. So a selected card marks its frame and the block but not itself;
a line marks its card, that card’s frame and the block; and an address
drawn in several cards, such as an ancestor line, marks each of them. An
address that is not drawn marks nothing. A band, which draws nothing,
counts as its timeline’s line. A group elision’s gap, written after every
item, is held by its frame (and, carried, by each ancestor card behind it).
Parameters#
drawing#
selected#
ReadonlyMap<string, ElementAddress>
Returns#
hoverOf()#
hoverOf(
hit,band):Hover
Defined in: arranger/src/boxes.ts:727
What the pointer highlights: the box under it (a card or a frame), the
boundary it is on, and band, the band it is on (bandUnder), which
the caller reads only where the press lies inside the edited element.
Parameters#
hit#
band#
BandBox | null
Returns#
isAffordance()#
isAffordance(
source):source is AffordanceSource
Defined in: arranger/src/boxes.ts:59
Whether source is an affordance’s rather than a descriptor’s.
Parameters#
source#
Returns#
source is AffordanceSource
isAncestorCard()#
isAncestorCard(
box):boolean
Defined in: arranger/src/boxes.ts:102
Whether box is an ancestor card (docs/drawing.md in TimeToShare, section 8.8): a card the
block holds behind a frame, with no place, never moved, resized or reordered, offering no band.
It is no item and no card of isCard.
Parameters#
box#
Returns#
boolean
isBand()#
isBand(
box):box is BandBox
Defined in: arranger/src/boxes.ts:250
Whether box is a band.
Parameters#
box#
Returns#
box is BandBox
isCard()#
isCard(
box):box is CardBox
Defined in: arranger/src/boxes.ts:88
Whether box is a card.
Parameters#
box#
Returns#
box is CardBox
isDisplayed()#
isDisplayed(
box):boolean
Defined in: arranger/src/boxes.ts:379
Whether box is drawn: a frame or a card is when its own rectangle is
(DrawnBox.displayed; one that is not displayed keeps its record and the
range of what it still draws, section 2.4); the block’s own box and a band,
which draws nothing, always count as drawn.
Parameters#
box#
Returns#
boolean
isHeld()#
isHeld(
box):box is CardBox
Defined in: arranger/src/boxes.ts:93
Whether box is a card held by a frame, a group member’s: a card that is no item.
Parameters#
box#
Returns#
box is CardBox
isHoveredBand()#
isHoveredBand(
band,hover):boolean
Defined in: arranger/src/boxes.ts:742
Whether the band band is the one hover marks: the hovered band’s
address, held by the hovered card.
Parameters#
band#
hover#
Returns#
boolean
isItem()#
isItem(
box):box is ItemBox
Defined in: arranger/src/boxes.ts:83
Whether box is an item: a frame, or a card the block holds.
Parameters#
box#
Returns#
box is ItemBox
itemHolding()#
itemHolding(
drawing,box):ItemBox
Defined in: arranger/src/boxes.ts:454
The item holding box: the box itself when it is an item, its frame when it is a held card.
Parameters#
drawing#
box#
Returns#
itemOf()#
itemOf(
drawing,key):ItemBox
Defined in: arranger/src/boxes.ts:445
The item key of drawing, a group’s frame or an ungrouped root’s card.
Parameters#
drawing#
key#
Returns#
keyedBox()#
Defined in: arranger/src/boxes.ts:431
The frame or card of drawing whose place lies under key.
Parameters#
drawing#
key#
Returns#
offeredBands()#
offeredBands(
drawing,timeline): readonlyBandBox[]
Defined in: arranger/src/boxes.ts:555
The bands the drawing records for timeline, in drawing order: the bands
its timeline editor offers. Every recorded band is present; whether an
editor offers them at all (the timeline editor of timeline, the
innermost open editor of its block) is the caller’s test. Memoized by the
drawing.
Parameters#
drawing#
timeline#
string
Returns#
readonly BandBox[]
pressSelection()#
pressSelection(
hit,editing,inside):Address|null
Defined in: arranger/src/boxes.ts:707
What a press selects: what it hit, when it lies inside the edited element,
else nothing (null). A card selects the card (its shadow does the same),
a frame its group, any other element that element, each when inside
(the keys of the drawn addresses inside the edited element,
BlockNodeData.inside) holds its element address; the block itself
selects the block on the arranger (editing null) and in the block’s own
bundle editor, never in another editor. A band selects itself: only a
band of the edited timeline is hit.
Parameters#
hit#
editing#
Editing | null
inside#
ReadonlySet<string>
Returns#
Address | null
raisedRoot()#
raisedRoot(
block,editing):string|null
Defined in: arranger/src/boxes.ts:119
The root whose ancestor cards block block shows raised over every
frame while editing, the innermost open editor, is open: the root of
the timeline a timeline editor in this block edits, where no timeline
from the root’s child down to the edited one is a group member (the
edited timeline is then drawn in no member card below the root), and
the root is either in no group or itself a member of one while it draws
an ancestor card, a descendant of it being a member: such a root stands
in its own group’s frame and lies covered behind the frame holding its
descendant, and its card comes to the front over that frame; null for
any other editor, none, or another block’s. The one decision of the
raise, which the stacking (stackingOf) is read with.
Parameters#
block#
Pick<Block, "id" | "manifest">
editing#
Editing | null
Returns#
string | null
roleOf()#
roleOf(
descriptor):Role
Defined in: arranger/src/boxes.ts:509
What a descriptor draws, read from its source: the block’s background, a frame, a card’s own rectangle, a card’s shadow, a segment’s boundary line, else an element.
Parameters#
descriptor#
Returns#
shapeBox()#
shapeBox(
drawing,element):DrawnBox|undefined
Defined in: arranger/src/boxes.ts:440
The displayed frame or card whose own rectangle is the element at
element in drawing.elements (a card’s shadow is drawn from the same
element); undefined for any other element.
Parameters#
drawing#
element#
number
Returns#
DrawnBox | undefined
showsContainedSelection()#
showsContainedSelection(
role,box,holding):boolean
Defined in: arranger/src/boxes.ts:835
Whether a descriptor shows that its box holds part of the selection: a
card’s or a frame’s own rectangle, box, among holding (holdingOf),
never a card’s shadow.
Parameters#
role#
box#
DrawnBox | undefined
holding#
ReadonlySet<string>
Returns#
boolean
showsSelection()#
showsSelection(
role,address,selected):boolean
Defined in: arranger/src/boxes.ts:822
Whether a descriptor shows the selection: it carries a selected address and is not a card’s shadow, so a selected card glows on its own rectangle.
Parameters#
role#
address#
selected#
ReadonlyMap<string, ElementAddress>
Returns#
boolean
stackingOf()#
stackingOf(
drawing,raised):Stacking
Defined in: arranger/src/boxes.ts:198
The stacking of drawing with the ancestor cards of raised raised
(Stacking), once per drawing and root. Ranks: the n ancestor cards
not raised 0 to n − 1 by record order, every other frame and card n,
a raised one n + 1 plus its record index. A line takes the rank of the
card drawing it (an ancestor card’s lines carry LineAxis.ancestor, its
key the card’s); a box whose rectangle is not drawn covers nothing.
Parameters#
drawing#
raised#
string | null
Returns#
verticalStretchOf()#
verticalStretchOf(
box):"spacing"|"margin"
Defined in: arranger/src/boxes.ts:477
What a vertical Stretch of the container box changes (section 1): its
margin when it has exactly one content, which has no gap to widen, else
its spacing, the gap between its contents.
Parameters#
box#
Returns#
"spacing" | "margin"
workedBox()#
workedBox(
drawing,block,address,editing):DrawnBox|undefined
Defined in: arranger/src/boxes.ts:408
The container of drawing, the drawing of block block, that the
element address address names where editing, the innermost open
editor, works: as boxOf gives it, except for a card address, which
covers every card of its timeline: inside a group editor the card in that
group’s frame (frameGroupOf), else the timeline’s only card, a card
with a place before an ancestor card; undefined where no frame tells
several cards apart (on the arranger, in the bundle editor), and where no
container has the address.
Parameters#
drawing#
block#
string
address#
editing#
Editing | null
Returns#
DrawnBox | undefined