Introduction
This plugin automatically adjusts the canvas size to fit its container or the browser window, ensuring a responsive and adaptive user experience. It listens to window or container resize events and updates the Stage dimensions accordingly.
This plugin is essential for maintaining a seamless layout across different screen sizes and devices, especially in collaborative environments where flexibility and visibility are key.
Usage
Import the Plugin
Start by importing the plugin:
import { WeaveStageResizePlugin } from "@inditextech/weave-sdk";
Register the Plugin
Then register the plugin on the Weave class instance.
const instance = new Weave({
...
plugins: [
...,
new WeaveStageResizePlugin(), (1)
]
})
| 1 | Added in this step. |