carstenschaefer / DrawerJs

A customizable WYSIWYG HTML canvas editor.
https://www.drawerjs.com
MIT License
556 stars 113 forks source link

Shapes Border and Fill default Color #79

Closed LDSmj closed 3 months ago

LDSmj commented 7 months ago

I want to set the default border color for shapes to black. Currently, even though the default color on the color picker is black, I still need to select black to apply it as the border color.

I'm not sure if this is its code: /**

but still not fixing the problem.

I also want to change the default color for the fill to transparent.

LDSmj commented 3 months ago

I found the solution and would like to share it here in case others experience the same problem.

I am using the standalone version, so I edited the drawerJs.standalone.js file.

To set the default color, find the following line of code:

"this.drawerInstance.activeColor" and change it to the desired default color, for example, 'transparent'.