diff --git a/src/css/component.css b/src/css/component.css
index 58b0ad1..23175bf 100644
--- a/src/css/component.css
+++ b/src/css/component.css
@@ -42,6 +42,38 @@
border-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;
}
+/****************\
+| UI Color Input |
+\****************/
+
+.ui_color_input {
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ position: relative;
+ overflow: hidden;
+ vertical-align: middle;
+}
+
+.ui_color_input input[type="color"] {
+ display: block;
+ cursor: pointer;
+ padding: 0;
+ border: .2rem solid var(--input-background-color);
+ width: 3rem;
+}
+
+.ui_color_input .alpha_overlay {
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9bRdGKiBlERDJUJwuiIo5ahSJUCLVCqw4mL/2DJg1Jiouj4Fpw8Gex6uDirKuDqyAI/oA4OTopukiJ9yWFFjFeeLyP8+45vHcfEKyVmGa1jQOabpvJeExMZ1bFjld0YxgBCOiTmWXMSVICvvV1T51Ud1Ge5d/3Z/WoWYsBAZF4lhmmTbxBPL1pG5z3iQVWkFXic+Ixky5I/Mh1xeM3znmXgzxTMFPJeWKBWMy3sNLCrGBqxFPEEVXTKT+Y9ljlvMVZK1VY4578heGsvrLMdVpDiGMRS5AgQkEFRZRgI0q7ToqFJJ3HfPyDrl8il0KuIhg5FlCGBtn1g//B79lauckJLykcA9pfHOdjBOjYBepVx/k+dpz6CRB6Bq70pr9cA2Y+Sa82tcgR0LsNXFw3NWUPuNwBBp4M2ZRdKUQrmMsB72f0TRmg/xboWvPm1jjH6QOQolklboCDQ2A0T9nrPu/ubJ3bvz2N+f0AL+pyjMZuudYAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfkCx4BHwaj7CMVAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAAAC5JREFUOMtjfPfuHQNuICgoiEeWiYECMKp5ZGhm/P//Px7p9+/fjwbYqGZKNAMAANAI7r7rfkQAAAAASUVORK5CYII=');
+ background-size: 100% 100%;
+ position: absolute;
+ top: 3px;
+ left: 3px;
+ right: 3px;
+ bottom: 3px;
+ pointer-events: none;
+}
+
/**************************\
| UI Color Picker Gradient |
\**************************/
@@ -244,11 +276,16 @@ button img{
}
.ui_input_group > input,
.ui_input_group > .ui_number_input,
-.ui_input_group > .ui_range {
+.ui_input_group > .ui_range,
+.ui_input_group > .ui_color_sample {
border-radius: 0;
height: auto;
min-width: 0;
}
+.ui_input_group > .ui_color_sample {
+ border: none;
+ width: 100%;
+}
.ui_input_group > :first-child {
border-radius: var(--input-border-radius) 0 0 var(--input-border-radius);
}
@@ -572,6 +609,30 @@ button img{
.ui_swatches .swatch_group.rows_3 {
max-height: calc(6.9rem - 2px);
}
+.ui_swatches .swatch_group.cols_1 .swatch {
+ width: 100%;
+}
+.ui_swatches .swatch_group.cols_2 .swatch {
+ width: 50%;
+}
+.ui_swatches .swatch_group.cols_3 .swatch {
+ width: 33.33%;
+}
+.ui_swatches .swatch_group.cols_4 .swatch {
+ width: 25%;
+}
+.ui_swatches .swatch_group.cols_5 .swatch {
+ width: 20%;
+}
+.ui_swatches .swatch_group.cols_6 .swatch {
+ width: 16.66%;
+}
+.ui_swatches .swatch_group.cols_7 .swatch {
+ width: 14.29%;
+}
+.ui_swatches .swatch_group.cols_8 .swatch {
+ width: 12.5%;
+}
.ui_swatches .swatch {
background: white;
diff --git a/src/css/layout.css b/src/css/layout.css
index 6cfdfbd..8b8e3a9 100644
--- a/src/css/layout.css
+++ b/src/css/layout.css
@@ -473,7 +473,7 @@ body .sp-preview{
clear:both;
margin-bottom: 2px;
}
-.block.details input{
+.block.details input[type="number"]{
width: 70px;
padding: 3px 5px;
}
@@ -638,3 +638,27 @@ canvas{
width: 88px;
}
}
+
+/* ========== dialogs ======================================================= */
+
+#dialog_color_picker_group {
+ width: 60%;
+}
+#dialog_color_channel_group {
+ width: 40%;
+ margin-left: 1rem;
+}
+
+@media screen and (max-width: 450px) {
+ #dialog_color_picker .ui_flex_group {
+ flex-wrap: wrap;
+ }
+ #dialog_color_picker_group {
+ width: 100%;
+ }
+ #dialog_color_channel_group {
+ width: 100%;
+ margin-left: 0;
+ margin-top: 1rem;
+ }
+}
\ No newline at end of file
diff --git a/src/css/popup.css b/src/css/popup.css
index 372e183..87df3c6 100644
--- a/src/css/popup.css
+++ b/src/css/popup.css
@@ -1,4 +1,4 @@
-#popup{
+#popup {
position:fixed;
display:none;
top: 15vh;
@@ -12,12 +12,11 @@
max-width: 500px;
max-height: calc(80vh);
margin:0px auto 0px auto;
- padding:10px;
+ padding: 4rem 0 5rem 0;
box-shadow: 0 0 0 4000px rgba(0,0,0,0.3), 0 0 20px rgba(0,0,0,0.5);
z-index: 100;
- overflow-y: auto;
font-size: 13px;
- overflow-y: scroll;
+ overflow: hidden;
}
#popup.wide{
max-width: 840px;
@@ -26,27 +25,52 @@
color: var(--link-color);
}
#popup h2{
- margin: -10px -10px 5px -10px;
- padding: 6px 10px;
- font-size: 18px;
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ margin: 0;
+ height: 4rem;
+ line-height: 4rem;
+ padding: 0 1rem;
+ font-size: 1.8rem;
background-color: rgba(255, 255, 255, 0.3);
background-color: var(--header-background-color);
+ z-index: 0;
/*cursor:move;*/
}
+#popup #dialog_content {
+ overflow-y: auto;
+ max-height: calc(80vh - 9rem);
+ padding: 1rem;
+}
#popup .buttons{
- text-align:center;
- margin-top:20px;
- margin-bottom:5px;
+ position: absolute;
+ background-color: var(--block-background-color);
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 5rem;
+ line-height: 4rem;
+ margin: 0;
+ padding: .5rem 0;
+ text-align: center;
+ border-top: 1px solid var(--header-background-color);
}
#popup .close{
- float: right;
+ position: absolute;
+ right: 0;
+ top: 0;
min-width: 0;
padding: 5px;
line-height: 0.5;
font-size: 16px;
- margin-left: 10px;
+ margin-top: 10px;
+ margin-right: 10px;
border: none;
background: none;
+ z-index: 1;
}
#popup td, #popup th{
height: 25px;
diff --git a/src/css/utility.css b/src/css/utility.css
index 4a2b0f2..6a387e7 100644
--- a/src/css/utility.css
+++ b/src/css/utility.css
@@ -11,6 +11,11 @@
max-width: 6.4rem;
overflow: hidden;
}
+.label_width_medium {
+ width: 100%;
+ max-width: 10.4rem;
+ overflow: hidden;
+}
/* Font color utility */
.text_red { color: var(--text-color-red); }
diff --git a/src/js/config.js b/src/js/config.js
index 1a08c77..0e5ac72 100644
--- a/src/js/config.js
+++ b/src/js/config.js
@@ -18,6 +18,9 @@ config.layer = null;
config.need_render = false;
config.need_render_changed_params = false; // Set specifically when param change in layer details triggered render
config.mouse = {};
+config.swatches = {
+ default: [] // Only default used right now, object format for swatch swapping in future.
+};
//requires styles in reset.css
config.themes = [
diff --git a/src/js/core/components/color-input.js b/src/js/core/components/color-input.js
new file mode 100644
index 0000000..0673bed
--- /dev/null
+++ b/src/js/core/components/color-input.js
@@ -0,0 +1,171 @@
+import Helper_class from './../../libs/helpers.js';
+import Dialog_class from './../../libs/popup.js';
+import GUI_colors_class from './../gui/gui-colors.js';
+
+const Helper = new Helper_class();
+let POP;
+
+/**
+ * This input opens a custom color picker dialog that is more tightly integrated with the application (swatch selection, etc).
+ * It can also handle alpha values, whereas native color input can't.
+ */
+
+(function ($) {
+
+ const template = `
+
@@ -95,6 +95,74 @@ var template = `
`;
+const dialogTemplate = `
+
+`;
+
/**
* GUI class responsible for rendering colors block on right sidebar
*/
@@ -102,77 +170,86 @@ class GUI_colors_class {
constructor() {
this.el = null;
+ this.COLOR = '#000000';
+ this.ALPHA = 255;
+ this.colorNotSet = true;
+ this.uiType = null;
this.butons = null;
this.sections = null;
this.inputs = null;
this.Helper = new Helper_class();
}
- render_main_colors() {
- var saved_color = this.Helper.getCookie('color');
- if(saved_color != null)
- config.COLOR = saved_color;
-
- this.el = document.getElementById('toggle_colors');
- this.el.innerHTML = template;
+ render_main_colors(uiType) {
+ this.uiType = uiType || 'sidebar';
+ if (this.uiType === 'dialog') {
+ this.el = document.getElementById('dialog_color_picker');
+ this.el.innerHTML = dialogTemplate;
+ } else {
+ var saved_color = this.Helper.getCookie('color');
+ if (saved_color != null) config.COLOR = saved_color;
+ this.el = document.getElementById('toggle_colors');
+ this.el.innerHTML = sidebarTemplate;
+ }
this.init_components();
- this.render_range_gradients = Helper.throttle(this.render_range_gradients, 50);
+ this.render_ui_deferred = Helper.throttle(this.render_ui_deferred, 50);
}
init_components() {
// Store button references
this.buttons = {
- toggleColorSwatches: $('#toggle_color_swatches_section_button'),
- toggleColorPicker: $('#toggle_color_picker_section_button'),
- toggleColorChannels: $('#toggle_color_channels_section_button')
+ toggleColorSwatches: $('#toggle_color_swatches_section_button', this.el),
+ toggleColorPicker: $('#toggle_color_picker_section_button', this.el),
+ toggleColorChannels: $('#toggle_color_channels_section_button', this.el)
};
// Store UI section references
this.sections = {
- swatches: $('#color_section_swatches'),
+ swatches: $('#color_section_swatches', this.el),
swatchesPlaceholder: document.createComment('Placeholder comment for color swatches'),
- picker: $('#color_section_picker'),
+ picker: $('#color_section_picker', this.el),
pickerPlaceholder: document.createComment('Placeholder comment for color picker'),
- channels: $('#color_section_channels'),
+ channels: $('#color_section_channels', this.el),
channelsPlaceholder: document.createComment('Placeholder comment for color channels')
};
// Store references to all inputs in DOM
+ const idPrefix = this.uiType === 'dialog' ? 'dialog_' : '';
this.inputs = {
- sample: $('#selected_color_sample'),
- swatches: $('#color_swatches'),
- pickerGradient: $('#color_picker_gradient'),
- hex: $('#color_hex'),
+ sample: $(`#${idPrefix}selected_color_sample`, this.el),
+ swatches: $(`#${idPrefix}color_swatches`, this.el),
+ pickerGradient: $(`#${idPrefix}color_picker_gradient`, this.el),
+ hex: $(`#${idPrefix}color_hex`, this.el),
rgb: {
r: {
- range: $('#rgb_r_range'),
- number: $('#rgb_r')
+ range: $(`#${idPrefix}rgb_r_range`, this.el),
+ number: $(`#${idPrefix}rgb_r`, this.el)
},
g: {
- range: $('#rgb_g_range'),
- number: $('#rgb_g')
+ range: $(`#${idPrefix}rgb_g_range`, this.el),
+ number: $(`#${idPrefix}rgb_g`, this.el)
},
b: {
- range: $('#rgb_b_range'),
- number: $('#rgb_b')
+ range: $(`#${idPrefix}rgb_b_range`, this.el),
+ number: $(`#${idPrefix}rgb_b`, this.el)
},
a: {
- range: $('#rgb_a_range'),
- number: $('#rgb_a')
+ range: $(`#${idPrefix}rgb_a_range`, this.el),
+ number: $(`#${idPrefix}rgb_a`, this.el)
}
},
hsl: {
h: {
- range: $('#hsl_h_range'),
- number: $('#hsl_h')
+ range: $(`#${idPrefix}hsl_h_range`, this.el),
+ number: $(`#${idPrefix}hsl_h`, this.el)
},
s: {
- range: $('#hsl_s_range'),
- number: $('#hsl_s')
+ range: $(`#${idPrefix}hsl_s_range`, this.el),
+ number: $(`#${idPrefix}hsl_s`, this.el)
},
l: {
- range: $('#hsl_l_range'),
- number: $('#hsl_l')
+ range: $(`#${idPrefix}hsl_l_range`, this.el),
+ number: $(`#${idPrefix}hsl_l`, this.el)
}
}
};
@@ -239,12 +316,15 @@ class GUI_colors_class {
// Initialize color swatches
this.inputs.swatches
- .uiSwatches({ rows: 3, count: 21 })
+ .uiSwatches({ rows: 3, cols: 7, count: 21, readonly: this.uiType === 'dialog' })
.on('input', () => {
this.set_color({
hex: this.inputs.swatches.uiSwatches('get_selected_hex')
});
});
+ if (this.uiType === 'dialog') {
+ this.inputs.swatches.uiSwatches('set_all_hex', config.swatches.default);
+ }
// Initialize color picker gradient
this.inputs.pickerGradient
@@ -260,7 +340,8 @@ class GUI_colors_class {
// Initialize hex entry
this.inputs.hex
- .on('input', () => {
+ .on('input', (event) => {
+ console.log(event);
const value = this.inputs.hex.val();
const trimmedValue = value.trim();
if (value !== trimmedValue) {
@@ -272,7 +353,7 @@ class GUI_colors_class {
.on('blur', () => {
const value = this.inputs.hex.val();
if (!/^\#[0-9A-F]{6}$/gi.test(value)) {
- this.inputs.hex.val(config.COLOR);
+ this.inputs.hex.val(this.uiType === 'dialog' ? this.COLOR : config.COLOR);
this.inputs.hex[0].setCustomValidity('');
}
});
@@ -296,7 +377,7 @@ class GUI_colors_class {
}
// Update all inputs from config.COLOR
- this.render_config_color();
+ this.render_selected_color();
}
/**
@@ -322,7 +403,7 @@ class GUI_colors_class {
}
// Set new color by rgb
else if ('r' in definition || 'b' in definition || 'g' in definition) {
- const previousRgb = Helper.hexToRgb(config.COLOR);
+ const previousRgb = Helper.hexToRgb(this.uiType === 'dialog' ? this.COLOR : config.COLOR);
newColor = Helper.rgbToHex(
'r' in definition ? Math.min(255, Math.max(0, parseInt(definition.r, 10) || 0)) : previousRgb.r,
'g' in definition ? Math.min(255, Math.max(0, parseInt(definition.g, 10) || 0)) : previousRgb.g,
@@ -331,7 +412,7 @@ class GUI_colors_class {
}
// Set new color by hsv
else if ('v' in definition) {
- const previousRgb = Helper.hexToRgb(config.COLOR);
+ const previousRgb = Helper.hexToRgb(this.uiType === 'dialog' ? this.COLOR : config.COLOR);
const previousHsv = Helper.rgbToHsv(previousRgb.r, previousRgb.g, previousRgb.b);
hsv = {
h: 'h' in definition ? Math.min(360, Math.max(0, parseInt(definition.h, 10) || 0)) / 360 : previousHsv.h,
@@ -355,18 +436,29 @@ class GUI_colors_class {
}
// Re-render UI if changes made
if (newColor != null || newAlpha != null) {
- config.COLOR = newColor != null ? newColor : config.COLOR;
- config.ALPHA = newAlpha != null ? newAlpha : config.ALPHA;
+ if (this.uiType === 'dialog') {
+ this.COLOR = newColor != null ? newColor : this.COLOR;
+ this.ALPHA = newAlpha != null ? newAlpha : this.ALPHA;
+ if (this.colorNotSet) {
+ this.colorNotSet = false;
+ $('#dialog_previous_color_sample', this.el)[0].style.background = this.COLOR;
+ }
+ } else {
+ config.COLOR = newColor != null ? newColor : config.COLOR;
+ config.ALPHA = newAlpha != null ? newAlpha : config.ALPHA;
+ }
if (hsl && !hsv) {
hsv = Helper.hslToHsv(hsl.h, hsl.s, hsl.l);
}
if (hsv && !hsl) {
hsl = Helper.hsvToHsl(hsv.h, hsv.s, hsv.v);
}
- this.render_config_color({ hsl, hsv });
+ this.render_selected_color({ hsl, hsv });
}
- this.Helper.setCookie('color', config.COLOR);
+ if (this.uiType === 'sidebar') {
+ this.Helper.setCookie('color', config.COLOR);
+ }
}
/**
@@ -375,25 +467,29 @@ class GUI_colors_class {
* hsl - override for hsl values so it isn't calculated based on rgb (can lose selected hue/saturation otherwise)
* hsv - override for hsv values so it isn't calculated based on rgb (can lose selected hue/saturation otherwise)
*/
- render_config_color(options) {
+ render_selected_color(options) {
options = options || {};
+ const COLOR = this.uiType === 'dialog' ? this.COLOR : config.COLOR;
+ const ALPHA = this.uiType === 'dialog' ? this.ALPHA : config.ALPHA;
- this.inputs.sample.css('background', config.COLOR);
+ this.inputs.sample.css('background', COLOR);
- this.inputs.swatches.uiSwatches('set_selected_hex', config.COLOR);
+ if (this.uiType !== 'dialog') {
+ this.inputs.swatches.uiSwatches('set_selected_hex', COLOR);
+ }
const hexInput = this.inputs.hex[0];
- hexInput.value = config.COLOR;
+ hexInput.value = COLOR;
hexInput.setCustomValidity('');
- const rgb = Helper.hexToRgb(config.COLOR);
+ const rgb = Helper.hexToRgb(COLOR);
delete rgb.a;
for (let rgbKey in rgb) {
this.inputs.rgb[rgbKey].range.uiRange('set_value', rgb[rgbKey]);
this.inputs.rgb[rgbKey].number.uiNumberInput('set_value', rgb[rgbKey]);
}
- this.inputs.rgb.a.range.uiRange('set_value', config.ALPHA);
- this.inputs.rgb.a.number.uiNumberInput('set_value', config.ALPHA);
+ this.inputs.rgb.a.range.uiRange('set_value', ALPHA);
+ this.inputs.rgb.a.number.uiNumberInput('set_value', ALPHA);
const hsv = options.hsv || Helper.rgbToHsv(rgb.r, rgb.g, rgb.b);
@@ -404,7 +500,7 @@ class GUI_colors_class {
this.inputs.hsl[hslKey].number.uiNumberInput('set_value', hslValue);
}
- this.render_range_gradients({ hsl, hsv });
+ this.render_ui_deferred({ hsl, hsv });
}
/**
@@ -414,11 +510,12 @@ class GUI_colors_class {
* hsl - override for hsl values so it isn't calculated based on rgb (can lose selected hue/saturation otherwise)
* hsv - override for hsv values so it isn't calculated based on rgb (can lose selected hue/saturation otherwise)
*/
- render_range_gradients(options) {
+ render_ui_deferred(options) {
options = options || {};
+ const COLOR = this.uiType === 'dialog' ? this.COLOR : config.COLOR;
// RGB
- const rgb = Helper.hexToRgb(config.COLOR);
+ const rgb = Helper.hexToRgb(COLOR);
delete rgb.a;
for (let rgbKey in rgb) {
const rangeMin = JSON.parse(JSON.stringify(rgb));
@@ -431,7 +528,7 @@ class GUI_colors_class {
}
// A
this.inputs.rgb.a.range.uiRange('set_background',
- `linear-gradient(to right, transparent, ${ config.COLOR })`
+ `linear-gradient(to right, transparent, ${ COLOR })`
);
// HSV
const hsv = options.hsv || Helper.rgbToHsv(rgb.r, rgb.g, rgb.b);
@@ -470,6 +567,11 @@ class GUI_colors_class {
this.inputs.hsl.l.range.uiRange('set_background',
`linear-gradient(to right, #000000 0%, ${ Helper.hslToHex(rangeMid.h, rangeMid.s, rangeMid.l) } 50%, #ffffff 100%)`
);
+
+ // Store swatch values
+ if (this.uiType === 'sidebar') {
+ config.swatches.default = this.inputs.swatches.uiSwatches('get_all_hex');
+ }
}
}
diff --git a/src/js/core/gui/gui-details.js b/src/js/core/gui/gui-details.js
index 0783694..94632ee 100644
--- a/src/js/core/gui/gui-details.js
+++ b/src/js/core/gui/gui-details.js
@@ -293,14 +293,21 @@ class GUI_details_class {
render_color(events) {
var layer = config.layer;
+ let $colorInput;
+ if (events) {
+ $colorInput = $(document.getElementById('detail_color')).uiColorInput();
+ } else {
+ $colorInput = $(document.getElementById('detail_color'));
+ }
+
if (layer != undefined) {
- document.getElementById('detail_color').value = layer.color;
+ $colorInput.uiColorInput('set_value', layer.color);
}
if (events) {
//events
- document.getElementById('detail_color').addEventListener('change', function (e) {
- var value = this.value;
+ $colorInput.on('change', function (e) {
+ const value = $colorInput.uiColorInput('get_value');
config.layer.color = value;
config.need_render = true;
config.need_render_changed_params = true;
diff --git a/src/js/core/gui/gui-tools.js b/src/js/core/gui/gui-tools.js
index 5c68ccd..445b238 100644
--- a/src/js/core/gui/gui-tools.js
+++ b/src/js/core/gui/gui-tools.js
@@ -346,27 +346,28 @@ class GUI_tools_class {
elementTitle.innerHTML = title + ': ';
elementTitle.for = k;
- var elementInput = document.createElement('input');
- elementInput.type = 'color';
- elementInput.id = k;
- elementInput.value = item;
-
- elementInput.addEventListener('keyup', (event) => {
- this.action_data().attributes[event.target.id] = event.target.value;
- });
- elementInput.addEventListener('change', (event) => {
- const actionData = this.action_data();
- actionData.attributes[event.target.id] = event.target.value;
- if (actionData.on_update != undefined) {
- //send event
- var moduleKey = actionData.name;
- var functionName = actionData.on_update;
- this.tools_modules[moduleKey][functionName]({ key: event.target.id, value: event.target.value });
- }
- });
+ var colorInput = document.createElement('input');
+ colorInput.type = 'color';
+ const $colorInput = $(colorInput)
+ .uiColorInput({
+ id: k,
+ value: item
+ })
+ .on('change', () => {
+ let value = $colorInput.uiColorInput('get_value');
+ const id = $colorInput.uiColorInput('get_id');
+ const actionData = this.action_data();
+ actionData.attributes[id] = value;
+ if (actionData.on_update != undefined) {
+ //send event
+ var moduleKey = actionData.name;
+ var functionName = actionData.on_update;
+ this.tools_modules[moduleKey][functionName]({ key: id, value: value });
+ }
+ });
itemDom.appendChild(elementTitle);
- itemDom.appendChild(elementInput);
+ itemDom.appendChild($colorInput[0]);
}
else {
alertify.error('Error: unsupported attribute type:' + typeof item + ', ' + k);
diff --git a/src/js/tools/pick_color.js b/src/js/tools/pick_color.js
index fbc29bc..72a372b 100644
--- a/src/js/tools/pick_color.js
+++ b/src/js/tools/pick_color.js
@@ -40,7 +40,10 @@ class Pick_color_class extends Base_tools_class {
_this.dragMove(event);
});
document.addEventListener('mouseup', function (event) {
- _this.copy_color_to_ckipboard();
+ var _this = this;
+ if (config.TOOL.name != _this.name)
+ return;
+ _this.copy_color_to_clipboard();
});
// collect touch events
@@ -99,7 +102,7 @@ class Pick_color_class extends Base_tools_class {
this.Base_gui.GUI_colors.set_color(newColorDefinition);
}
- copy_color_to_ckipboard() {
+ copy_color_to_clipboard() {
navigator.clipboard.writeText(config.COLOR);
}