fitFrameToContent

See source code

Fit a frame to its content.

function fitFrameToContent(
  editor: Editor,
  id: TLShapeId,
  opts?: {
    padding: number
  }
): void

Parameters

NameDescription

editor

tlraw editor instance.

id

Id of the frame you wish to fit to content.

opts

{
  padding: number
}

Options for fitting the frame.

Returns

void
Prev
exportToBlob
Next
getArrowBindings