From da3efd93758d6e16df534cf94e9488f57b9779e2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 10 Jul 2021 15:10:33 +0200 Subject: [PATCH] Move updateStyle --- src/dom_components/view/ComponentView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 40fde2e90..398e2b3cd 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -293,7 +293,7 @@ export default Backbone.View.extend({ * */ updateAttributes() { const attrs = []; - const { model, $el, el, config } = this; + const { model, $el, el } = this; const { highlightable, textable, type } = model.attributes; const defaultAttr = { @@ -311,6 +311,7 @@ export default Backbone.View.extend({ // Remove all current attributes each(el.attributes, attr => attrs.push(attr.nodeName)); attrs.forEach(attr => $el.removeAttr(attr)); + this.updateStyle(); const attr = { ...defaultAttr, ...model.getAttributes() @@ -320,7 +321,6 @@ export default Backbone.View.extend({ keys(attr).forEach(key => attr[key] === false && delete attr[key]); $el.attr(attr); - this.updateStyle(); }, /**