Skip to content

@fabwcie/free-drawing / utils/slides

utils/slides ​

Functions ​

getSlides() ​

getSlides(shapes, layer): Frame[]

Defined in: packages/free-drawing/src/utils/slides.ts:33

Slides of a drawing: its visible frames, in reading order

Parameters

shapes

DrawingShape[]

Drawing shapes

layer

Container

Draw layer: coordinates of the boxes of the frames

Returns

Frame[]

Frames presented one after the other


getSlideTitle() ​

getSlideTitle(frame): string

Defined in: packages/free-drawing/src/utils/slides.ts:45

Title of a slide

Parameters

frame

Frame

Frame of the slide

Returns

string

Name of the frame, empty without


inReadingOrder() ​

inReadingOrder<T>(items, getBox): T[]

Defined in: packages/free-drawing/src/utils/slides.ts:13

Items in reading order: rows from top to bottom, left to right in a row. An item starting above the middle of the first item of a row belongs to this row: boxes of a row need not be aligned

Type Parameters

T

T

Parameters

items

T[]

Items to order

getBox

(item) => IRect

Box of an item

Returns

T[]

Items in reading order (new array)