FrameShapeUtil
Table of contents
Public class
Signature
class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {}
References
BaseBoxShapeUtil, TLFrameShape
Source
packages/tldraw/src/lib/shapes/frame/FrameShapeUtil.tsx
Properties
canBind
Public property
Signature
canBind: () => boolean
canDropShapes
Public property
Signature
canDropShapes: (shape: TLFrameShape, _shapes: TLShape[]) => boolean
References
canEdit
Public property
Signature
canEdit: () => boolean
canReceiveNewChildrenOfType
Public property
Signature
canReceiveNewChildrenOfType: (
shape: TLShape,
_type: TLShape['type']
) => boolean
References
migrations
Public static property
Signature
static migrations: import('@tldraw/editor').Migrations
References
onDragShapesOut
Public property
Signature
onDragShapesOut: (_shape: TLFrameShape, shapes: TLShape[]) => void
References
onDragShapesOver
Public property
Signature
onDragShapesOver: (
frame: TLFrameShape,
shapes: TLShape[]
) => {
shouldHint: boolean
}
References
onResize
Public property
Signature
onResize: TLOnResizeHandler<any>
References
onResizeEnd
Public property
Signature
onResizeEnd: TLOnResizeEndHandler<TLFrameShape>
References
TLOnResizeEndHandler, TLFrameShape
props
Public static property
Signature
static props: {
w: import('@tldraw/editor').Validator<number>
h: import('@tldraw/editor').Validator<number>
name: import('@tldraw/editor').Validator<string>
}
References
type
Public static property
Signature
static type: 'frame'
Methods
component()
Public method
Signature
component(shape: TLFrameShape): import('react/jsx-runtime').JSX.Element
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References
getDefaultProps()
Public method
Signature
getDefaultProps(): TLFrameShape['props']
References
getGeometry()
Public method
Signature
getGeometry(shape: TLFrameShape): Geometry2d
Parameters
Name | Description |
---|---|
|
|
Returns
Geometry2d
References
indicator()
Public method
Signature
indicator(shape: TLFrameShape): import('react/jsx-runtime').JSX.Element
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References
providesBackgroundForChildren()
Public method
Signature
providesBackgroundForChildren(): boolean
toSvg()
Public method
Signature
toSvg(shape: TLFrameShape): Promise<SVGElement> | SVGElement
Parameters
Name | Description |
---|---|
|
|
Returns
Promise<SVGElement> | SVGElement
References