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

TLFrameShape, TLShape


canEdit

Public property

Signature
canEdit: () => boolean

canReceiveNewChildrenOfType

Public property

Signature
canReceiveNewChildrenOfType: (
  shape: TLShape,
  _type: TLShape['type']
) => boolean
References

TLShape


migrations

Public static property

Signature
static migrations: import('@tldraw/editor').TLPropsMigrations
References

TLPropsMigrations


onDragShapesOut

Public property

Signature
onDragShapesOut: (_shape: TLFrameShape, shapes: TLShape[]) => void
References

TLFrameShape, TLShape


onDragShapesOver

Public property

Signature
onDragShapesOver: (frame: TLFrameShape, shapes: TLShape[]) => void
References

TLFrameShape, TLShape


onResize

Public property

Signature
onResize: TLOnResizeHandler<any>
References

TLOnResizeHandler


props

Public static property

Signature
static props: {
  h: import('@tldraw/editor').Validator<number>
  name: import('@tldraw/editor').Validator<string>
  w: import('@tldraw/editor').Validator<number>
}
References

Validator


type

Public static property

Signature
static type: 'frame'

Methods

component()

Public method

Signature
component(shape: TLFrameShape): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLFrameShape
Returns
import('react/jsx-runtime').JSX.Element
References

TLFrameShape


getDefaultProps()

Public method

Signature
getDefaultProps(): TLFrameShape['props']
References

TLFrameShape


getGeometry()

Public method

Signature
getGeometry(shape: TLFrameShape): Geometry2d
Parameters
NameDescription

shape

TLFrameShape
Returns
Geometry2d
References

TLFrameShape, Geometry2d


indicator()

Public method

Signature
indicator(shape: TLFrameShape): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLFrameShape
Returns
import('react/jsx-runtime').JSX.Element
References

TLFrameShape


providesBackgroundForChildren()

Public method

Signature
providesBackgroundForChildren(): boolean

toSvg()

Public method

Signature
toSvg(
  shape: TLFrameShape,
  ctx: SvgExportContext
): import('react/jsx-runtime').JSX.Element
Parameters
NameDescription

shape

TLFrameShape

ctx

SvgExportContext
Returns
import('react/jsx-runtime').JSX.Element
References

TLFrameShape, SvgExportContext


FrameShapeToolFrameToolbarItem