Weave.js

Stage Zoom

Activates support for zoom on the stage

Stage zoom on use on the Weave.js showcase

Introduction

This plugin enables smooth zooming in and out of the canvas, allowing users to focus on details or get an overview of the entire workspace. It supports mouse wheel, trackpad gestures, and programmatic control, with customizable zoom levels.

This plugin enhances navigation and usability in complex visual tools like whiteboards, diagrams, or design interfaces. It integrates seamlessly with the panning and resize plugins to provide a fully scalable and interactive canvas experience.

Dependencies

This plugin needs also registered on the Weave instance the following:

Usage

Import the Plugin

Start by importing the plugin:

import { WeaveStageZoomPlugin } from "@inditextech/weave-sdk";

Register the Plugin

Then register the plugin on the Weave class instance.

const instance = new Weave({
  ...
  plugins: [
    ...,
    new WeaveStageZoomPlugin(), 
  ]
})

You can also define:

  • The steps of the zoom.
  • The default step of the zoom.

For more information check the WeaveStageZoomPlugin plugin API.

Use the plugin

Once the plugin is registered the final user can change the zoom through the following actions: