Browse Source

Destroy correctly the color picker

pull/3147/head
Artur Arseniev 6 years ago
parent
commit
529fdf742e
  1. 5
      src/domain_abstract/ui/InputColor.js
  2. 1
      src/style_manager/view/PropertyColorView.js

5
src/domain_abstract/ui/InputColor.js

@ -28,6 +28,11 @@ export default Input.extend({
return `${this.ppfx}input-holder`;
},
remove() {
Input.prototype.remove.apply(this, arguments);
this.colorEl.spectrum('destroy');
},
/**
* Set value to the model
* @param {string} val

1
src/style_manager/view/PropertyColorView.js

@ -9,6 +9,7 @@ export default PropertyIntegerView.extend({
remove() {
PropertyIntegerView.prototype.remove.apply(this, arguments);
this.inputInst.remove();
['inputInst', '$color'].forEach(i => (this[i] = {}));
},

Loading…
Cancel
Save