Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > centerContent

Surface.centerContent() method#

Centers the tracked content inside the viewport, but does not adjust the current zoom.

Signature:

centerContent(params?: {        bounds?: ViewportBounds;        horizontal?: boolean;        vertical?: boolean;        doNotFirePanEvent?: boolean;        onComplete?: (p: PointXY) => any;        doNotAnimate?: boolean;        onStep?: () => any;    }): void;

Parameters#

ParameterTypeDescription
params{ bounds?: ViewportBounds; horizontal?: boolean; vertical?: boolean; doNotFirePanEvent?: boolean; onComplete?: (p: PointXY) => any; doNotAnimate?: boolean; onStep?: () => any; }Method parameters.

Returns:

void