Table of contents

Public class

Signature
class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {}
References

BaseBoxShapeUtil, TLImageShape

Source

packages/tldraw/src/lib/shapes/image/ImageShapeUtil.tsx


Properties

canCrop

Public property

Signature
canCrop: () => boolean

isAspectRatioLocked

Public property

Signature
isAspectRatioLocked: () => boolean

migrations

Public static property

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

TLShapePropsMigrations


onDoubleClick

Public property

Signature
onDoubleClick: (shape: TLImageShape) => void
References

TLImageShape


onDoubleClickEdge

Public property

Signature
onDoubleClickEdge: TLOnDoubleClickHandler<TLImageShape>
References

TLOnDoubleClickHandler, TLImageShape


props

Public static property

Signature
static props: {
  assetId: import('@tldraw/editor').Validator<
    import('@tldraw/editor').TLAssetId | null
  >
  crop: import('@tldraw/editor').Validator<{
    bottomRight: import('@tldraw/editor').VecModel
    topLeft: import('@tldraw/editor').VecModel
  } | null>
  h: import('@tldraw/editor').Validator<number>
  playing: import('@tldraw/editor').Validator<boolean>
  url: import('@tldraw/editor').Validator<string>
  w: import('@tldraw/editor').Validator<number>
}
References

Validator, TLAssetId, VecModel


type

Public static property

Signature
static type: 'image'

Methods

component()

Public method

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

shape

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

TLImageShape


getDefaultProps()

Public method

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

TLImageShape


indicator()

Public method

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

shape

TLImageShape
Returns
import('react/jsx-runtime').JSX.Element | null
References

TLImageShape


toSvg()

Public method

Signature
toSvg(
  shape: TLImageShape
): Promise<import('react/jsx-runtime').JSX.Element | null>
Parameters
NameDescription

shape

TLImageShape
Returns
Promise<import('react/jsx-runtime').JSX.Element | null>
References

TLImageShape


HighlightToolbarItemisGifAnimated