Browse Source

Move updateStyle

pull/3670/head
Artur Arseniev 5 years ago
parent
commit
da3efd9375
  1. 4
      src/dom_components/view/ComponentView.js

4
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();
},
/**

Loading…
Cancel
Save