Public function

Contains the size within the given box size

Signature
function containBoxSize(
  originalSize: BoxWidthHeight,
  containBoxSize: BoxWidthHeight
): BoxWidthHeight
Parameters
NameDescription

originalSize

BoxWidthHeight

The size of the asset

containBoxSize

BoxWidthHeight

The container size

Returns
BoxWidthHeight

Adjusted size

Source

packages/tldraw/src/lib/utils/assets/assets.ts

compactMenuItemsContextMenu