Weave.js

Stage

Main node to structure the canvas elements

The Stage node is the root canvas container in Weave.js. Based on Konva’s Stage, it serves as the entry point for rendering all other visual or layout Nodes and manages the overall coordinate system.

All Nodes are rendered within the Stage, making it the central hub for your visual collaborative experience. It’s also where global behaviors—like grid rendering, selection, or snapping—are initialized and managed.

Usage

Import the Node

Start by importing the node:

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

Register the Node

Then register the node on the Weave class instance.

const instance = new Weave({
  ...
  nodes: [
    ...,
    new WeaveStageNode(), 
  ]
})

Use the node

Don't use this node directly.

The Stage node is a layering node, it doesn't render anything visual per-se to the end user.

To define your application structure: Stage and Layers, use the stores initialState configuration property on server-side. You can find more information on this links: