Skip to content

BlockSuite API Documentation / @blocksuite/blocks / EdgelessFrameManager

Class: EdgelessFrameManager

Extends

  • GfxExtension

Constructors

new EdgelessFrameManager()

new EdgelessFrameManager(gfx): EdgelessFrameManager

Parameters

gfx

GfxController

Returns

EdgelessFrameManager

Overrides

GfxExtension.constructor

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:153

Properties

gfx

protected readonly gfx: GfxController

Inherited from

GfxExtension.gfx

Defined in

packages/framework/block-std/dist/gfx/extension.d.ts:11


key

static key: string = 'frame-manager'

Overrides

GfxExtension.key

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:137

Accessors

frames

Get Signature

get frames(): FrameBlockModel[]

Get all sorted frames by presentation orderer, the legacy frame that uses index as presentation order will be put at the beginning of the array.

Returns

FrameBlockModel[]

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:146


std

Get Signature

get std(): BlockStdScope

Returns

BlockStdScope

Inherited from

GfxExtension.std

Defined in

packages/framework/block-std/dist/gfx/extension.d.ts:13

Methods

addElementsToFrame()

addElementsToFrame(frame, elements): void

Reset parent of elements to the frame

Parameters

frame

FrameBlockModel

elements

GfxModel[]

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:285


createFrameOnBound()

createFrameOnBound(bound): FrameBlockModel

Parameters

bound

Bound

Returns

FrameBlockModel

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:301


createFrameOnElements()

createFrameOnElements(elements): FrameBlockModel

Parameters

elements

GfxModel[]

Returns

FrameBlockModel

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:319


createFrameOnSelected()

createFrameOnSelected(): FrameBlockModel

Returns

FrameBlockModel

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:345


createFrameOnViewportCenter()

createFrameOnViewportCenter(wh): void

Parameters

wh

[number, number]

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:349


generatePresentationIndex()

generatePresentationIndex(): string

Returns

string

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:361


getChildElementsInFrame()

getChildElementsInFrame(frame): GfxModel[]

Get all elements in the frame, there are three cases:

  1. The frame doesn't have childElements, return all elements in the frame bound but not owned by another frame.
  2. Return all child elements of the frame if childElements exists.

Parameters

frame

FrameBlockModel

Returns

GfxModel[]

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:373


getElementsInFrameBound()

getElementsInFrameBound(frame, fullyContained): GfxModel[]

Get all elements in the frame bound, whatever the element already has another parent frame or not.

Parameters

frame

FrameBlockModel

fullyContained

boolean = true

Returns

GfxModel[]

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:391


getFrameFromPoint()

getFrameFromPoint(__namedParameters, ignoreFrames): null | FrameBlockModel

Get most top frame from the point.

Parameters

__namedParameters

IVec

ignoreFrames

FrameBlockModel[] = []

Returns

null | FrameBlockModel

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:403


getParentFrame()

getParentFrame(element): null | FrameBlockModel

Parameters

element

GfxModel

Returns

null | FrameBlockModel

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:413


mounted()

mounted(): void

Returns

void

Inherited from

GfxExtension.mounted

Defined in

packages/framework/block-std/dist/gfx/extension.d.ts:17


refreshLegacyFrameOrder()

refreshLegacyFrameOrder(): void

This method will populate presentationIndex for all legacy frames, and keep the orderer of the legacy frames.

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:422


removeAllChildrenFromFrame()

removeAllChildrenFromFrame(frame): void

Parameters

frame

FrameBlockModel

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:440


removeFromParentFrame()

removeFromParentFrame(element): void

Parameters

element

GfxModel

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:446


unmounted()

unmounted(): void

Returns

void

Overrides

GfxExtension.unmounted

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:452


extendGfx()

static extendGfx(_): void

Parameters

_

GfxController

Returns

void

Inherited from

GfxExtension.extendGfx

Defined in

packages/framework/block-std/dist/gfx/extension.d.ts:15


framePresentationComparator()

static framePresentationComparator<T>(a, b): -1 | 0 | 1

Type Parameters

T extends FrameBlockModel | { index: string; presentationIndex: string; }

Parameters

a

T

b

T

Returns

-1 | 0 | 1

Defined in

packages/blocks/src/root-block/edgeless/frame-manager.ts:158


setup()

static setup(di): void

Parameters

di

Container

Returns

void

Inherited from

GfxExtension.setup

Defined in

packages/framework/block-std/dist/gfx/extension.d.ts:16