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?: Function;        doNotAnimate?: boolean;        onStep?: Function;    }): void;

Parameters#

ParameterTypeDescription
params{ bounds?: ViewportBounds; horizontal?: boolean; vertical?: boolean; doNotFirePanEvent?: boolean; onComplete?: Function; doNotAnimate?: boolean; onStep?: Function; }Method parameters.

Returns:

void