From 3154b7bd4978d059cdfe620a5e9dfaa2eb481b77 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 2 Sep 2018 22:09:33 +0200 Subject: [PATCH] Re-render blocks on change of any of its properties --- src/block_manager/view/BlockView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/block_manager/view/BlockView.js b/src/block_manager/view/BlockView.js index 9a2da769e..6dc672c7d 100644 --- a/src/block_manager/view/BlockView.js +++ b/src/block_manager/view/BlockView.js @@ -11,11 +11,13 @@ module.exports = Backbone.View.extend({ }, initialize(o, config = {}) { + const { model } = this; this.em = config.em; this.config = config; this.endDrag = this.endDrag.bind(this); 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); }, /**