The Measure node is a complex node used to render a representation of the the distance between two points on the canvas. It needs:
-
A measure unit, e.g. meters, centimeters, milimeters, or inches.
-
A reference measure. A distance you previously know based on the measure unit.
-
A reference distance. The distance between two points on the canvas that represent the reference measure.
Usage
Import the Node
Start by importing the node:
import { WeaveMeasureNode } from "@inditextech/weave-sdk";
Register the Node
Then register the node on the Weave class instance.
const instance = new Weave({
...
nodes: [
...,
new WeaveMeasureNode(), (1)
]
})
| 1 | Added in this step. |
Use the node
We provide an action named Measure Tool that allows users to add Measure nodes to the application in a simple way.