Browse Source

Store the wrapper by default

pull/1551/head
Artur Arseniev 8 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. // structure, but in case you need it you can use this option.
// If you have `config.avoidInlineStyle` disabled the wrapper will be stored // If you have `config.avoidInlineStyle` disabled the wrapper will be stored
// as we need to store inlined style. // as we need to store inlined style.
storeWrapper: 0, storeWrapper: 1,
// List of void elements // List of void elements
voidElements: [ 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 the result is an object I consider it the wrapper
if (isObj) { if (isObj) {
this.getWrapper().set(result); this.getWrapper().set(result);
// .initClasses()
// .loadTraits()
// .initComponents();
} else { } else {
this.getComponents().add(result); this.getComponents().add(result);
} }
@ -379,8 +376,8 @@ module.exports = () => {
if (keys.indexOf('components') >= 0) { if (keys.indexOf('components') >= 0) {
const { em } = this; const { em } = this;
const storeWrap = // const storeWrap = (em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper;
(em && !em.getConfig('avoidInlineStyle')) || c.storeWrapper; const storeWrap = c.storeWrapper;
const toStore = storeWrap ? this.getWrapper() : this.getComponents(); const toStore = storeWrap ? this.getWrapper() : this.getComponents();
obj.components = JSON.stringify(toStore); obj.components = JSON.stringify(toStore);
} }

Loading…
Cancel
Save