Closed LDSmj closed 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'.
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: /**
@param {fabric.Object} object */ ShapeBorder.prototype.updateColorFromObject = function (object) { var color = null; color = object.get('stroke'); if (color) { this.currentColor = color; } else { this.currentColor = pluginsNamespace.ColorpickerControl.TRANSPARENT; } };
i tried changing the code to this
" this.currentColor = '#000000'; "
but still not fixing the problem.
I also want to change the default color for the fill to transparent.