Browse Source

Re-render blocks on change of any of its properties

pull/1446/head
Artur Arseniev 8 years ago
parent
commit
3154b7bd49
  1. 4
      src/block_manager/view/BlockView.js

4
src/block_manager/view/BlockView.js

@ -11,11 +11,13 @@ module.exports = Backbone.View.extend({
}, },
initialize(o, config = {}) { initialize(o, config = {}) {
const { model } = this;
this.em = config.em; this.em = config.em;
this.config = config; this.config = config;
this.endDrag = this.endDrag.bind(this); this.endDrag = this.endDrag.bind(this);
this.ppfx = config.pStylePrefix || ''; this.ppfx = config.pStylePrefix || '';
this.listenTo(this.model, 'destroy remove', this.remove); this.listenTo(model, 'destroy remove', this.remove);
this.listenTo(model, 'change', this.render);
}, },
/** /**

Loading…
Cancel
Save