You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@luileito thanks for a great plugin. Super easy to use.
I have the following code in the mousedownBefore event.
mousedownBefore: function(elem,data,evt){varbrushType=getBrushType();if(brushType=='eraser'){// There is a method to set the brush in eraser mode.data.options.graphics.lineWidth=20;data.sketch.eraser();}elseif(brushType=='pencil'){constcolor=getBrushColor()??"black";// There is a method to get the default mode (pencil) back.data.options.graphics.lineWidth=2;data.options.graphics.strokeStyle=color;data.sketch.saveGraphics(data.options.graphics);data.sketch.pencil();}}
The function named getBrushColor is similar to your getBrushType function. It returns a HEX color of the color selected on the page.
Example UI:
However, when I execute the "svg.create" method the contents returned only use black.
Am I doing something wrong? Is this supported?
The text was updated successfully, but these errors were encountered:
mousedownBefore: function(elem,data,evt){varbrushType=getBrushType();if(brushType=='eraser'){// There is a method to set the brush in eraser mode.data.options.graphics.lineWidth=20;data.sketch.eraser();}elseif(brushType=='pencil'){constcolor=getBrushColor()??"black";// There is a method to get the default mode (pencil) back.data.options.graphics.lineWidth=2;data.options.graphics.strokeStyle=color;changeGraphics(data,data.options.graphics);data.sketch.pencil();}}
@luileito thanks for a great plugin. Super easy to use.
I have the following code in the
mousedownBefore
event.The function named
getBrushColor
is similar to yourgetBrushType
function. It returns a HEX color of the color selected on the page.Example UI:
However, when I execute the "svg.create" method the contents returned only use black.
Am I doing something wrong? Is this supported?
The text was updated successfully, but these errors were encountered: