Browse Source

Store the wrapper by default

pull/1551/head
Artur Arseniev 7 years ago
parent
commit
9d1e625b38
  1. 2
      src/dom_components/config/config.js
  2. 7
      src/dom_components/index.js

2
src/dom_components/config/config.js

@ -37,7 +37,7 @@ module.exports = {
// structure, but in case you need it you can use this option.
// If you have `config.avoidInlineStyle` disabled the wrapper will be stored
// as we need to store inlined style.
storeWrapper: 0,
storeWrapper: 1,
// List of void elements
voidElements: [

7
src/dom_components/index.js

@ -349,9 +349,6 @@ module.exports = () => {
// If the result is an object I consider it the wrapper
if (isObj) {
this.getWrapper().set(result);
// .initClasses()
// .loadTraits()
// .initComponents();
} else {
this.getComponents().add(result);
}
@ -379,8 +376,8 @@ module.exports = () => {
if (keys.indexOf('components') >= 0) {
const { em } = this;
const storeWrap =
(em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper;
// const storeWrap = (em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper;
const storeWrap = c.storeWrapper;
const toStore = storeWrap ? this.getWrapper() : this.getComponents();
obj.components = JSON.stringify(toStore);
}

Loading…
Cancel
Save