ImageShapeUtil
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').TLPropsMigrations
References
onDoubleClick
Public property
Signature
onDoubleClick: (shape: TLImageShape) => void
References
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
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element
References
getDefaultProps()
Public method
Signature
getDefaultProps(): TLImageShape['props']
References
indicator()
Public method
Signature
indicator(shape: TLImageShape): import('react/jsx-runtime').JSX.Element | null
Parameters
Name | Description |
---|---|
|
|
Returns
import('react/jsx-runtime').JSX.Element | null
References
isAnimated()
Public method
Signature
isAnimated(shape: TLImageShape): boolean
Parameters
Name | Description |
---|---|
|
|
Returns
boolean
References
toSvg()
Public method
Signature
toSvg(
shape: TLImageShape
): Promise<import('react/jsx-runtime').JSX.Element | null>
Parameters
Name | Description |
---|---|
|
|
Returns
Promise<import('react/jsx-runtime').JSX.Element | null>
References