Browse Source

Clear cached stuff in property view

pull/1446/head
Artur Arseniev 8 years ago
parent
commit
3c95de9683
  1. 7
      src/style_manager/view/PropertyCompositeView.js
  2. 6
      src/style_manager/view/PropertyFileView.js
  3. 5
      src/style_manager/view/PropertySliderView.js
  4. 7
      src/style_manager/view/PropertyView.js

7
src/style_manager/view/PropertyCompositeView.js

@ -123,5 +123,12 @@ module.exports = PropertyView.extend({
}
return value;
},
clearCached() {
PropertyView.prototype.clearCached.apply(this, arguments);
this.$input = null;
this.props = null;
this.$props = null;
}
});

6
src/style_manager/view/PropertyFileView.js

@ -51,6 +51,12 @@ module.exports = PropertyView.extend({
this.setValue(this.componentValue, 0);
},
clearCached() {
PropertyView.prototype.clearCached.apply(this, arguments);
this.$preview = null;
this.$previewBox = null;
},
setValue(value, f) {
PropertyView.prototype.setValue.apply(this, arguments);
this.setPreviewView(value && value != this.model.getDefaultValue());

5
src/style_manager/view/PropertySliderView.js

@ -56,5 +56,10 @@ module.exports = Property.extend({
if (!this.model.get('showInput')) {
this.inputInst.el.style.display = 'none';
}
},
clearCached() {
Property.prototype.clearCached.apply(this, arguments);
this.slider = null;
}
});

7
src/style_manager/view/PropertyView.js

@ -473,7 +473,14 @@ module.exports = Backbone.View.extend({
this.setValue('');
},
clearCached() {
this.clearEl = null;
this.input = null;
this.$input = null;
},
render() {
this.clearCached();
const pfx = this.pfx;
const model = this.model;
const el = this.el;

Loading…
Cancel
Save