Home > @jsplumbtoolkit/browser-ui > Surface > centerOnAndZoom
#
Surface.centerOnAndZoom() methodCenter on the current object and zoom in on it.
Signature:
centerOnAndZoom(element: any, fillRatio?: number, doNotAnimate?: boolean): void;
#
ParametersParameter | Type | Description |
---|---|---|
element | any | The element to center. Can be a DOM element, vertex id, or a Node/Group |
fillRatio | number | How much of the viewport to fill with the object we zoom in on. This will be limited by the current zoom range. Defaults to 0.6. |
doNotAnimate | boolean | by default, this operation will be animated. |
Returns:
void