Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsteff committed Jul 8, 2024
1 parent b202b1d commit 28047d5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions docs/Advanced/Refs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,31 @@ export interface CanvasRef {
containerHeight?: number;

/**
* Center the canvas to the viewport.
* Positions the canvas to the viewport.
*/
centerCanvas?: () => void;
positionCanvas?: (position: CanvasPosition, animated?: boolean) => void;

/**
* Fit the canvas to the viewport.
*/
fitCanvas?: () => void;
fitCanvas?: (animated?: boolean) => void;

/**
* Fit a node to the viewport.
*/
fitToNode?: (nodeId: string, animated?: boolean) => void;

/**
* Scroll to X/Y
*/
setScrollXY?: (xy: [number, number], animated?: boolean) => void;

observe: (el: HTMLDivElement) => void;

/**
* Factor of zoom.
*/
zoom: number;

/**
* Set a zoom factor of the canvas.
Expand Down

0 comments on commit 28047d5

Please sign in to comment.