Table of contents
class BoundsSnaps {}

Constructor

Constructs a new instance of the BoundsSnaps class

Parameters
NameDescription

manager

SnapManager

Properties

editor

readonly editor: Editor

manager

readonly manager: SnapManager

Methods

getSnapPoints()

getSnapPoints(shapeId: TLShapeId): BoundsSnapPoint[]
Parameters
NameDescription

shapeId

TLShapeId
Returns
BoundsSnapPoint[]

snapResizeShapes()

snapResizeShapes({
  initialSelectionPageBounds,
  dragDelta,
  handle: originalHandle,
  isAspectRatioLocked,
  isResizingFromCenter,
}: {
  dragDelta: Vec
  handle: SelectionCorner | SelectionEdge
  initialSelectionPageBounds: Box
  isAspectRatioLocked: boolean
  isResizingFromCenter: boolean
}): SnapData
Parameters
NameDescription

{ initialSelectionPageBounds, dragDelta, handle: originalHandle, isAspectRatioLocked, isResizingFromCenter, }

{
  dragDelta: Vec
  handle: SelectionCorner | SelectionEdge
  initialSelectionPageBounds: Box
  isAspectRatioLocked: boolean
  isResizingFromCenter: boolean
}
Returns
SnapData

snapTranslateShapes()

snapTranslateShapes({
  lockedAxis,
  initialSelectionPageBounds,
  initialSelectionSnapPoints,
  dragDelta,
}: {
  dragDelta: Vec
  initialSelectionPageBounds: Box
  initialSelectionSnapPoints: BoundsSnapPoint[]
  lockedAxis: 'x' | 'y' | null
}): SnapData
Parameters
NameDescription

{ lockedAxis, initialSelectionPageBounds, initialSelectionSnapPoints, dragDelta, }

{
  dragDelta: Vec
  initialSelectionPageBounds: Box
  initialSelectionSnapPoints: BoundsSnapPoint[]
  lockedAxis: 'x' | 'y' | null
}
Returns
SnapData

BindingUtilBox