workspace/blocks#
Interfaces#
Block#
Defined in: workspace/blocks.ts:49
One block: its placement on the canvas and its own manifest, which carries
the block’s styling in its graphical member.
Extends#
Properties#
arrangement?#
readonlyoptionalarrangement?:ItemArrangement
Defined in: workspace/blocks.ts:69
How its items are arranged; absent where they stand at their places, as
a block without the member in its file and a set of null leave it.
Its items’ stated places are kept and not used while it is present.
height#
readonlyheight:number|null
Defined in: workspace/blocks.ts:23
Inherited from#
id#
readonlyid:string
Defined in: workspace/blocks.ts:50
index#
readonlyindex:string
Defined in: workspace/blocks.ts:54
The fractional index among the blocks of the same parent.
length#
readonlylength:number
Defined in: workspace/blocks.ts:16
The graphical length of the root, positive.
Inherited from#
manifest#
readonlymanifest:Manifest
Defined in: workspace/blocks.ts:70
margin#
readonlymargin:number
Defined in: workspace/blocks.ts:20
The block’s margin, empty space drawn above its first item and below its last: finite, at least 0.
Inherited from#
parent#
readonlyparent:string|null
Defined in: workspace/blocks.ts:52
The canvas group holding the block; null in this version.
places#
readonlyplaces:Places
Defined in: workspace/blocks.ts:63
The stated places of the containers of its manifest’s drawing: an item’s
place by its group’s or ungrouped root’s ID, and in a group’s entry the
size, spacing and margin of each member’s card in its frame by member ID
(places[G].cards[T]).
scale#
readonlyscale:number
Defined in: workspace/blocks.ts:14
The uniform scale of the drawing on the canvas, positive.
Inherited from#
spacing#
readonlyspacing:number
Defined in: workspace/blocks.ts:18
The block’s spacing, the gap between its items at their default y: finite, at least 0.
Inherited from#
width#
readonlywidth:number|null
Defined in: workspace/blocks.ts:22
The requested block size, positive, or null for the content’s own size.
Inherited from#
x#
readonlyx:number
Defined in: workspace/blocks.ts:55
y#
readonlyy:number
Defined in: workspace/blocks.ts:56
BlockPlacement#
Defined in: workspace/blocks.ts:12
The inputs of a block’s drawing besides its manifest and the style layers.
Extended by#
Properties#
height#
readonlyheight:number|null
Defined in: workspace/blocks.ts:23
length#
readonlylength:number
Defined in: workspace/blocks.ts:16
The graphical length of the root, positive.
margin#
readonlymargin:number
Defined in: workspace/blocks.ts:20
The block’s margin, empty space drawn above its first item and below its last: finite, at least 0.
scale#
readonlyscale:number
Defined in: workspace/blocks.ts:14
The uniform scale of the drawing on the canvas, positive.
spacing#
readonlyspacing:number
Defined in: workspace/blocks.ts:18
The block’s spacing, the gap between its items at their default y: finite, at least 0.
width#
readonlywidth:number|null
Defined in: workspace/blocks.ts:22
The requested block size, positive, or null for the content’s own size.
ItemArrangement#
Defined in: workspace/blocks.ts:39
How a block’s items, its groups and ungrouped roots, are arranged instead
of standing at their places: packed one under another (vertical) or side
by side (horizontal, every root the groups hang on drawn once behind the
row), in the order order gives (itemOrder: IDs naming no item are
passed over, items it leaves out follow in drawing order).
Properties#
direction#
readonlydirection:"vertical"|"horizontal"
Defined in: workspace/blocks.ts:40
order#
readonlyorder: readonlystring[]
Defined in: workspace/blocks.ts:42
Item IDs, each once.
Type Aliases#
BlockId#
BlockId =
string
Defined in: workspace/blocks.ts:7
A block id: ten characters of base 36, unique within the workspace.
ItemDirection#
ItemDirection = typeof
ITEM_DIRECTIONS[number]
Defined in: workspace/blocks.ts:30
A direction a block’s items may be arranged in.
Variables#
BLOCK_ID#
constBLOCK_ID:RegExp
Defined in: workspace/blocks.ts:9
The form of a block ID: ten lowercase base-36 characters.
BLOCK_MEMBERS#
constBLOCK_MEMBERS: readonly ["id","parent","index","x","y","scale","length","spacing","margin","width","height","places","manifest"]
Defined in: workspace/blocks.ts:74
The members every block states, in the order a block is built; arrangement follows places where present.
ITEM_DIRECTIONS#
constITEM_DIRECTIONS: readonly ["vertical","horizontal"]
Defined in: workspace/blocks.ts:27
The directions a block’s items may be arranged in.