LGraphCanvas Class
marks as dirty the canvas, this way it will be rendered again
Constructor
LGraphCanvas
(
-
canvas
-
graph
-
options
Parameters:
-
canvas
HTMLCanvasthe canvas where you want to render (it accepts a selector in string format or the canvas element itself)
-
graph
LGraph[optional]
-
options
Object[optional] { skip_rendering, autoresize }
Item Index
Methods
clear
()
clears all the data inside
closeSubgraph
(
-
assigns
closes a subgraph contained inside a node
Parameters:
-
assigns
LGrapha graph
getCanvasWindow
()
Window
Used to attach the canvas in a popup
Returns:
Window:
returns the window where the canvas is attached (the DOM root node)
openSubgraph
(
-
graph
opens a graph contained inside a node in the current graph
Parameters:
-
graph
LGraph
setCanvas
(
-
assigns
assigns a canvas
Parameters:
-
assigns
Canvasa canvas (also accepts the ID of the element (not a selector)
setGraph
(
-
graph
assigns a graph, you can reasign graphs to the same canvas
Parameters:
-
graph
LGraph
startRendering
()
starts rendering the content of the canvas when needed
stopRendering
()
stops rendering the content of the canvas (to save resources)