mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-15 17:37:30 +01:00
use configurable default colors on reset
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user