Overview
The WeaveStagePanningPlugin class that enables panning the Stage by dragging the canvas background. It allows users to move across large workspaces easily, improving navigation and usability, especially in collaborative and zoomable environments.
This plugin provides a smooth, intuitive drag-to-move experience, essential for exploring detailed or expansive canvases.
The class extends the WeavePlugin class
TypeScript types
type WeaveStagePanningPluginParams = {
config?: Partial<WeaveStagePanningPluginConfig>;
};
type WeaveStagePanningPluginConfig = {
edgePanOffset: number;
edgePanMinSpeed: number;
edgePanSpeed: number;
edgePanMaxSpeed: number;
};
Parameters
For WeaveStagePanningPluginParams:
| Property | Type | Required | Description |
|---|---|---|---|
|
|
Required |
Config parameters for the plugin. |
For WeaveStagePanningPluginConfig:
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
|
|
|
The offset from stage borders where auto-panning happens when dragging nodes. In pixels. |
|
|
|
|
The minimum speed of the auto-panning. In pixels. |
|
|
|
|
The base speed of the auto-panning. In pixels. |
|
|
|
|
The maximum speed of the auto-panning. In pixels. |