use configurable default colors on reset

This commit is contained in:
dm
2021-01-21 08:54:29 +01:00
parent 3d391c571c
commit ba72cf7dc8
2 changed files with 35 additions and 23 deletions

View File

@@ -109,6 +109,10 @@ var SpacedeckSections = {
color_picker_hue: 127,
color_picker_opacity: 255,
default_text_color: ENV.options.default_text_color ? ENV.options.default_text_color : "#000000",
default_stroke_color: ENV.options.default_stroke_color ? ENV.options.default_stroke_color : "#000000",
default_fill_color: ENV.options.default_fill_color ? ENV.options.default_fill_color : "#000000",
swatches: ENV.options.swatches ? ENV.options.swatches : [
{id:1, hex:"#ff00ff"},
{id:2, hex:"#ffff00"},
@@ -922,10 +926,10 @@ var SpacedeckSections = {
}
this.hide_toolbar_props();
// reset active_style to black for new creation of artifacts
this.active_style.text_color = "#000000";
this.active_style.stroke_color = "#000000";
this.active_style.fill_color = "#000000";
// reset active_style to defaults for new creation of artifacts
this.active_style.text_color = this.default_text_color;
this.active_style.stroke_color = this.default_stroke_color;
this.active_style.fill_color = this.default_fill_color;
document.getSelection().removeAllRanges();