Closed Ma-Y closed 2 years ago
Hi @Ma-Y - I'm not entirely sure what you mean. I'm guessing one of these two options:
1) If you just want to use an existing canvas, you can pass the canvas id directly. ie, space = new CanvasSpace('#user-canvas')
, or pass the element directly like space = new CanvasSpace( canvas_element )
2) If you have the canvas context but don't want to create a CanvasSpace, you can access the drawing functions in CanvasForm by passing the context to instantiate it. ie, form = new CanvasForm( ctx )
Thanks that's exactly what i need.
user html (user will decide where to put it)(some times there's some state issue if it is put elsewhere)
pts
var space = Pts.SpaceContextOnExistingCanvas(..getElementById(...)..)