BlockSuite API Documentation / @blocksuite/blocks / EdgelessFrameManager
Class: EdgelessFrameManager
Extends
GfxExtension
Constructors
new EdgelessFrameManager()
new EdgelessFrameManager(
gfx
):EdgelessFrameManager
Parameters
gfx
GfxController
Returns
Overrides
GfxExtension.constructor
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:151
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:135
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
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:144
std
Get Signature
get std():
BlockStdScope
Returns
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
elements
GfxModel
[]
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:283
createFrameOnBound()
createFrameOnBound(
bound
):FrameBlockModel
Parameters
bound
Bound
Returns
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:299
createFrameOnElements()
createFrameOnElements(
elements
):undefined
|FrameBlockModel
Parameters
elements
GfxModel
[]
Returns
undefined
| FrameBlockModel
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:317
createFrameOnSelected()
createFrameOnSelected():
undefined
|FrameBlockModel
Returns
undefined
| FrameBlockModel
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:356
createFrameOnViewportCenter()
createFrameOnViewportCenter(
wh
):void
Parameters
wh
[number
, number
]
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:360
generatePresentationIndex()
generatePresentationIndex():
string
Returns
string
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:372
getChildElementsInFrame()
getChildElementsInFrame(
frame
):GfxModel
[]
Get all elements in the frame, there are three cases:
- The frame doesn't have
childElements
, return all elements in the frame bound but not owned by another frame. - Return all child elements of the frame if
childElements
exists.
Parameters
frame
Returns
GfxModel
[]
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:384
getElementsInFrameBound()
getElementsInFrameBound(
frame
,fullyContained
):GfxModel
[]
Get all elements in the frame bound, whatever the element already has another parent frame or not.
Parameters
frame
fullyContained
boolean
= true
Returns
GfxModel
[]
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:402
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:414
getParentFrame()
getParentFrame(
element
):null
|FrameBlockModel
Parameters
element
GfxModel
Returns
null
| FrameBlockModel
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:424
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:433
removeAllChildrenFromFrame()
removeAllChildrenFromFrame(
frame
):void
Parameters
frame
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:451
removeFromParentFrame()
removeFromParentFrame(
element
):void
Parameters
element
GfxModel
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:457
unmounted()
unmounted():
void
Returns
void
Overrides
GfxExtension.unmounted
Defined in
packages/blocks/src/root-block/edgeless/frame-manager.ts:463
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:156
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