ocanvas icon indicating copy to clipboard operation
ocanvas copied to clipboard

is it possible to draw a measure line?

Open jy1989 opened this issue 9 years ago • 1 comments

hi I want to use this library to make a function like a draw board. but after look up the doc I found that all object seems "static"

so is it possible use the library to draw a measure line? means I want to move the start or the end of the line by mouse. or something like pencil. and is it possible combine the object? now when move the child, the parent wont move. and how to achieve zoom and rotate the object by mouse??

Thank you very much

jy1989 avatar Feb 16 '16 10:02 jy1989

oCanvas is not specialized in any field, so you will most often need to implement things like these on your own (using oCanvas as the tool). It provides you with a Line object and mouse events, and you will need to listen for mouse events on the line and move the line as a response to that. If you want to move the parent when you move the child you need to handle the movement yourself based on mouse events. Same for zoom and rotate, listen for mouse events and update object properties to zoom and rotate.

koggdal avatar Feb 16 '16 10:02 koggdal