Browse Source

Fix PropertyColorView tests

pull/2732/head
Artur Arseniev 7 years ago
parent
commit
9cc99f4a24
  1. 11
      src/domain_abstract/ui/InputColor.js

11
src/domain_abstract/ui/InputColor.js

@ -56,16 +56,16 @@ export default Input.extend({
*/
getColorEl() {
if (!this.colorEl) {
const { em } = this;
const self = this;
const ppfx = this.ppfx;
var model = this.model;
var colorEl = $(`<div class="${this.ppfx}field-color-picker"></div>`);
var cpStyle = colorEl.get(0).style;
var elToAppend = this.em && this.em.config ? this.em.config.el : '';
var elToAppend = em && em.config ? em.config.el : '';
var colorPickerConfig =
(this.em && this.em.getConfig && this.em.getConfig('colorPicker')) ||
{};
(em && em.getConfig && em.getConfig('colorPicker')) || {};
const getColor = color => {
let cl =
color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();
@ -117,8 +117,9 @@ export default Input.extend({
}
});
this.em &&
this.em.on('component:selected', () => {
em &&
em.on &&
em.on('component:selected', () => {
changed = 1;
colorEl.spectrum('hide');
});

Loading…
Cancel
Save