Replies: 2 comments 9 replies
-
did you try on the mouse:down:before event? |
Beta Was this translation helpful? Give feedback.
6 replies
-
I just want to let the administrators know i've fixed the problem, so you can close this issue. It was very difficult to figure out, but got it. Thank you for your suggestions and ideas:) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does any one have a workaround or explanation as to why my canvas.freeDrawingBrush is not being plotted to the canvas if turned on (set equal to true via canvas.isDrawingMode) inside mouse:down event. It works perfectly fine if i set canvas.freeDrawingBrush = true outside the mouse:down event handler, but because of a timing issue, logically it makes sense to set it to true inside the mouse:down. Any work arounds here?
(isDrawingMode = false is set outside of this event handler)
new_canvas.on('mouse:down', function(e) {
isMouseDown = true;
new_canvas.isDrawingMode = true;
new_canvas.freeDrawingBrush.color = selectedColor
console.log("This is the canvas' current drawing mode: ")
console.log(new_canvas.isDrawingMode)
console.log(new_canvas.freeDrawingBrush.color)
console.log(new_canvas.freeDrawingBrush.width)
new_canvas.requestRenderAll(); // Re-render the canvas
}
});
Beta Was this translation helpful? Give feedback.
All reactions