Browse Source

Prevent adding style on temporary components

15-beta
Artur Arseniev 8 years ago
parent
commit
22c5204b3a
  1. 3
      src/dom_components/model/Component.js

3
src/dom_components/model/Component.js

@ -325,8 +325,9 @@ const Component = Backbone.Model.extend(Styleable).extend(
*/ */
setStyle(prop = {}, opts = {}) { setStyle(prop = {}, opts = {}) {
const em = this.em; const em = this.em;
const { opt } = this;
if (em && em.getConfig('avoidInlineStyle')) { if (em && em.getConfig('avoidInlineStyle') && !opt.temporary) {
prop = isString(prop) ? this.parseStyle(prop) : prop; prop = isString(prop) ? this.parseStyle(prop) : prop;
prop = { ...prop, ...this.get('style') }; prop = { ...prop, ...this.get('style') };
const state = this.get('state'); const state = this.get('state');

Loading…
Cancel
Save