Skip to main content

Pan Buttons

Provides the buttons around the perimeter of the Surface canvas that allow the user to nudge the pan.

Setup

Vanilla JS
React
Angular
Vue
Svelte
import { newInstance,
PanButtonsPlugin } from "@jsplumbtoolkit/browser-ui"

const toolkit = newInstance()

const surface = toolkit.render(someElement, {
"plugins": [
PanButtonsPlugin.type
]
});

Options

Interface PanButtonsPluginOptions

NameTypeDescription
panDistancenumberAmount in pixels to pan the surface by when one of the buttons is pressed and released. Defaults to 50.
panRepeatDistance?numberAmount in pixels to adjust pan by each time the timer fires. Defaults to 10.
panRepeatInterval?numberTime in milliseconds between successive adjustment to the pan. Defaults to 60.
startPanTimeout?numberTime in milliseconds after the mouse button is pressed before panning should start. Defaults to 150.