marquee#
Interfaces#
Rect#
Defined in: arranger/src/marquee.ts:15
An axis-aligned rectangle: on the canvas, or in a drawing’s own units.
Properties#
height#
readonlyheight:number
Defined in: arranger/src/marquee.ts:19
width#
readonlywidth:number
Defined in: arranger/src/marquee.ts:18
x#
readonlyx:number
Defined in: arranger/src/marquee.ts:16
y#
readonlyy:number
Defined in: arranger/src/marquee.ts:17
Functions#
elementsInRect()#
elementsInRect(
node,rect,inside,metrics):Address[]
Defined in: arranger/src/marquee.ts:104
The elements of node a marquee over the canvas rectangle rect selects,
as addresses in the node’s block, in drawing order, each once: the
addresses among inside (the node’s inside, by their keys) whose every
drawn element lies wholly in rect, edges included (boundsOf, on the
canvas). An address drawn in several places, such as an ancestor line
in several cards, is taken only when all of them lie inside. Every part of
a named timestamp (its wedge, labels and line, and the affordance of one
that draws nothing, affordancesOf) stands for the timestamp, and every
alignment anchor’s line and label for its named MatchStamp (ownerOf),
which is taken when all of them lie inside; a gap of an elision, its
ellipses and its labels stand for the gap (gapOf), whose bounds span its
card (a group elision’s, its frame’s member cards) from top to bottom,
every piece of it taken or none. What an ancestor card draws
(docs/drawing.md in TimeToShare, section 8.8), an affordance on its lines
included, counts only while that card is raised (raisedRoot, the node’s
editor): otherwise the card lies below the frames (stackingOf), and the
marquee reads the drawings above them alone, so an address drawn there
and in the card is taken by its drawings outside, and one drawn only
there is never taken. This is the one exception to “a coordinate is placed
wherever it is seen”: a marquee selects addresses, not places, and what an
unraised card alone shows beside the frames is taken once it is raised.
Frames and cards are containers, which a click selects, never a marquee;
a band draws nothing, so no marquee selects one either.
Parameters#
node#
rect#
inside#
ReadonlySet<string>
metrics#
FontMetrics
Returns#
Address[]
isContainerAddress()#
isContainerAddress(
drawing,address):boolean
Defined in: arranger/src/marquee.ts:38
Whether a drawn element carrying address is a container’s own
rectangle rather than an element: the block’s background (the bundle’s
address {}), a frame, a card or its shadow. The marquee and the focus
read elements only.
Parameters#
drawing#
address#
Returns#
boolean
rectOnCanvas()#
rectOnCanvas(
node,rect):Rect
Defined in: arranger/src/marquee.ts:43
A rectangle in the drawing of node as the canvas shows it: moved by the node’s position and scaled.