diff --git a/config/default.json b/config/default.json index 2838396..2354f70 100644 --- a/config/default.json +++ b/config/default.json @@ -26,5 +26,6 @@ "mail_smtp_secure": true, "mail_smtp_require_tls": true, "mail_smtp_user": "your.smtp.user", - "mail_smtp_pass": "your.secret.smtp.password" + "mail_smtp_pass": "your.secret.smtp.password", + "spacedeck": {} } diff --git a/public/javascripts/spacedeck_sections.js b/public/javascripts/spacedeck_sections.js index 6846a94..da1ba50 100644 --- a/public/javascripts/spacedeck_sections.js +++ b/public/javascripts/spacedeck_sections.js @@ -69,7 +69,7 @@ var SpacedeckSections = { letter_spacing: 0, stroke_color: "#000000", - fill_color: "#00000000", + fill_color: "#000000", text_color: "#000000", background_color: "#ffffff", @@ -109,7 +109,7 @@ var SpacedeckSections = { color_picker_hue: 127, color_picker_opacity: 255, - swatches: [ + swatches: ENV.options.swatches ? ENV.options.swatches : [ {id:1, hex:"#ff00ff"}, {id:2, hex:"#ffff00"}, {id:3, hex:"#00ffff"}, @@ -133,18 +133,7 @@ var SpacedeckSections = { {id:26, hex:"#d55c4b"}, {id:27, hex:"#6f4021"}, {id:29, hex:"#95a5a6"}, - {id:30, hex:"rgba(0,0,0,0)"}, - ], - - swatches_text: [ - {id:1, hex:"#9b59b6"}, - {id:2, hex:"#3498db"}, - {id:3, hex:"#2ecc71"}, - {id:4, hex:"#f1c40f"}, - {id:5, hex:"#e67e22"}, - {id:6, hex:"#d55c4b"}, - {id:8, hex:"#ffffff"}, - {id:10, hex:"#252525"}, + {id:30, hex:"rgba(0,0,0,0)"} ], fonts: [ @@ -933,6 +922,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"; document.getSelection().removeAllRanges(); diff --git a/views/spacedeck.ejs b/views/spacedeck.ejs index 20b841f..71d6f31 100644 --- a/views/spacedeck.ejs +++ b/views/spacedeck.ejs @@ -21,7 +21,8 @@ webHost: location.host, webEndpoint: location.origin, apiEndpoint: location.origin, - websocketsEndpoint: location.origin.replace("https:","wss:").replace("http:","ws:") + websocketsEndpoint: location.origin.replace("https:","wss:").replace("http:","ws:"), + options: <%- JSON.stringify(config.spacedeck) %> };