resizeScaled

See source code

Resize a shape that has a scale prop.

function resizeScaled(
  shape: TLBaseShape<
    any,
    {
      scale: number;
    }
  >,
  { initialBounds, scaleX, scaleY, newPoint, handle }: TLResizeInfo<any>,
): {
  props: {
    scale: number;
  };
  x: number;
  y: number;
};

Parameters

NameDescription

shape

TLBaseShape<
  any,
  {
    scale: number;
  }
>;

The shape to resize

{ initialBounds, scaleX, scaleY, newPoint, handle }

TLResizeInfo<any>;

Returns

{
  props: {
    scale: number;
  };
  x: number;
  y: number;
};
Prev
resizeBox
Next
rotateSelectionHandle