Is anyone here familiar with the DrawerJs library?
here is the link: https://github.com/carstenschaefer/DrawerJs/wiki
I am using this library in my web application, and my problem is that I want to change the default color for the fill and border-color of shapes. I have already managed to change the default color in the color-picker, but I still need to click the color in the color-picker for it to change its color.
I am using the drawerJs.standalone.js
I already tried modifying some default colors in the drawerJs.standalone.js and managed to change the default color for the color-picker, but I cannot find the click event that triggers the color change for the default.
like these one.
ShapeBorder.prototype.updateColorFromObject = function (object) {
var color = null;
color = object.get('stroke');
if (color) {
this.currentColor = color;
} else {
this.currentColor = pluginsNamespace.ColorpickerControl.TRANSPARENT;
//changed this part to black;
}
};
also this one.
// setup colorpicker for border color
this.colorpicker = new pluginsNamespace.ColorpickerControl(this.drawer, this.options);
this.currentColor = this.options.color;
//// change this one also to black
this.currentBorder = this.options.borderTypes[this.options.defaultBorder];
but still I need to click the color-picker to change the color.