Public typealias

Info about a resize.

Signature
type TLResizeInfo<T extends TLShape> = {
  handle: TLResizeHandle
  initialBounds: Box
  initialShape: T
  mode: TLResizeMode
  newPoint: Vec
  scaleX: number
  scaleY: number
}
Parameters
NameDescription

newPoint

The new local position of the shape.

handle

The handle being dragged.

mode

The type of resize.

scaleX

The scale in the x-axis.

scaleY

The scale in the y-axis.

initialBounds

The bounds of the shape at the start of the resize.

initialShape

The shape at the start of the resize.

References

TLShape, TLResizeHandle, Box, TLResizeMode, Vec

Source

packages/editor/src/lib/editor/shapes/ShapeUtil.ts

TLResizeHandleTLResizeMode