diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 90a828ce1..c636d6dd2 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -59,6 +59,7 @@ module.exports = Input.extend({ var colorEl = $(`
`); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; + var colorPickerConfig = this.target && this.target.getConfig && this.target.getConfig("colorPicker") || {}; const getColor = color => { let cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); return cl.replace(/ /g, ''); @@ -76,6 +77,10 @@ module.exports = Input.extend({ chooseText: 'Ok', cancelText: 'тип', palette: [], + + // config expanded here so that the functions below are not overridden + ...colorPickerConfig, + move(color) { const cl = getColor(color); cpStyle.backgroundColor = cl;