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').Migrations
References

Migrations


onDragShapesOut

Public property

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

TLFrameShape, TLShape


onDragShapesOver

Public property

Signature
onDragShapesOver: (
  frame: TLFrameShape,
  shapes: TLShape[]
) => {
  shouldHint: boolean
}
References

TLFrameShape, TLShape


onResize

Public property

Signature
onResize: TLOnResizeHandler<any>
References

TLOnResizeHandler


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

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): Promise<SVGElement> | SVGElement
Parameters
NameDescription

shape

TLFrameShape
Returns
Promise<SVGElement> | SVGElement
References

TLFrameShape


FrameShapeToolGeoShapeTool