reorder#

Interfaces#

OrderEntry#

Defined in: arranger/src/reorder.ts:39

A content of a container where it is drawn: its ID and its rectangle.

Properties#

height#

readonly height: number

Defined in: arranger/src/reorder.ts:44

id#

readonly id: string

Defined in: arranger/src/reorder.ts:40

width#

readonly width: number

Defined in: arranger/src/reorder.ts:43

x#

readonly x: number

Defined in: arranger/src/reorder.ts:41

y#

readonly y: number

Defined in: arranger/src/reorder.ts:42

Functions#

blockIndexCommand()#

blockIndexCommand(view, order, moved): SetCommand | null

Defined in: arranger/src/reorder.ts:294

The set putting the block moved where order (every block of view in their order, moved at its new place) has it: one new index between those of its neighbours there (core’s indexBetween), the other blocks keeping theirs; null when moved keeps its place.

Parameters#

view#

View

order#

readonly string[]

moved#

string

Returns#

SetCommand | null


canvasArrangementCommand()#

canvasArrangementCommand(view, arrangement): SetCommand | null

Defined in: arranger/src/reorder.ts:271

The set giving the workspace the arrangement arrangement of its blocks, null when it holds it.

Parameters#

view#

View

arrangement#

CanvasArrangement | null

Returns#

SetCommand | null


itemArrangementCommand()#

itemArrangementCommand(block, arrangement): SetCommand | null

Defined in: arranger/src/reorder.ts:253

The set giving block the arrangement arrangement (null places its items at their places again), null when it holds it already. Core stores a horizontal arrangement as the row its rules give, and refuses one they refuse (arrangement_conflict).

Parameters#

block#

Block

arrangement#

ItemArrangement | null

Returns#

SetCommand | null


memberOrderAt()#

memberOrderAt(manifest, drawing, group, dragged, y): string[]

Defined in: arranger/src/reorder.ts:137

The display order of group that dropping its member dragged at the drawing’s ordinate y gives: dragged before the first other member whose card’s middle lies below y, or last when none does. drawing is the drawing of manifest in the stored order, so the cards do not move under the pointer while it searches; each card stands for its timeline (core’s placedElement). The vertical call of orderAt.

Parameters#

manifest#

Manifest

drawing#

Drawing

group#

string

dragged#

string

y#

number

Returns#

string[]


orderAt()#

orderAt(entries, dragged, point, direction): string[]

Defined in: arranger/src/reorder.ts:59

The order entries (every content of a container, in their order, each where it is drawn in that order) take when dragged is dropped at point: dragged before the first other content that does not precede the point, or last. Along vertical a content precedes the point when its middle lies at or above it; along horizontal at or left of it; in a matrix, read row by row, when its row (the contents sharing its top) lies above the point’s (the last row whose top lies at or above the point, the first where none does), or it lies in the point’s row with its middle at or left of it. The contents do not move under the pointer while it searches: entries are where they lie before the drop.

Parameters#

entries#

readonly OrderEntry[]

dragged#

string

point#
x#

number

y#

number

direction#

"vertical" | "horizontal" | "matrix"

Returns#

string[]


reorderCommand()#

reorderCommand(block, group, order): SetCommand | null

Defined in: arranger/src/reorder.ts:157

The set giving group of block the display order order, null when it is the order already displayed (core’s displayOrder). An order equal to the group’s members deletes the group’s entry (order: null) instead of repeating them.

Parameters#

block#

Block

group#

string

order#

readonly string[]

Returns#

SetCommand | null


rowRefusal()#

rowRefusal(manifest, order, moved): string | null

Defined in: arranger/src/reorder.ts:192

Why the items of manifest cannot stand side by side in the order order that moving the item moved gives (core’s itemOrder of it), where the item would leave its place among the stretches of the roots it hangs on (the drawing specification’s “Drawn once”: along every root the stretches follow the row from left to right): for each root of moved, in its group’s display order, "G" stays right of "A", "B" and left of "C" on "R", naming in the order’s order the groups whose stretches lie wholly before its own (it stays right of them) and wholly after (left), where the order puts them on the wrong side; clauses joined by ; . null where moved keeps every such place: an ungrouped root, or a group hanging on nothing, is never refused.

Parameters#

manifest#

Manifest

order#

readonly string[]

moved#

string

Returns#

string | null


shownItemOrder()#

shownItemOrder(block): readonly string[]

Defined in: arranger/src/reorder.ts:238

The order of block’s items as it draws them arranged: for horizontal the row core’s rules give (rowOf; where they refuse it, the item order, as the block is then drawn one item under another), else the item order (itemOrder) of the stored order.

Parameters#

block#

Block

Returns#

readonly string[]


steppedOrder()#

steppedOrder(order, moved, step): string[] | null

Defined in: arranger/src/reorder.ts:87

order with moved taken out and put back step places further (null where that lies outside).

Parameters#

order#

readonly string[]

moved#

string

step#

number

Returns#

string[] | null