I have changed how users draw shapes by using presence canvas(=upper canvas)
If a user starts drawing a shape, instead of updating the shape to the document directly, I have made the shape be updated to user's presence instead. The shapes drawn in the user's presence is drawn on the upper canvas.
As soon as the user finishes drawing(mouse up or mouse out), the shape in the presence is transmitted to the document directly. To lessen the burden of the document storing unnecessarily many points, I have called compressPoints at that moment, thus reducing the amount of data stored in the document.
Any background context you want to provide?
The usage of presence canvas for drawing on canvas is also used in Toonie. The implementation of the drawing methods is quite similar to toonie
What this PR does / why we need it?
I have changed how users draw shapes by using presence canvas(=upper canvas)
If a user starts drawing a shape, instead of updating the shape to the document directly, I have made the shape be updated to user's presence instead. The shapes drawn in the user's presence is drawn on the upper canvas.
As soon as the user finishes drawing(mouse up or mouse out), the shape in the presence is transmitted to the document directly. To lessen the burden of the document storing unnecessarily many points, I have called compressPoints at that moment, thus reducing the amount of data stored in the document.
Any background context you want to provide?
The usage of presence canvas for drawing on canvas is also used in Toonie. The implementation of the drawing methods is quite similar to toonie
What are the relevant tickets?
Fixes #
Checklist