Browse Source

IMPRO: default generator

dev-feat-component_preview
chris 5 months ago
parent
commit
9f374eeaa4
  1. 6
      src/component/FlexContainerComponent.js
  2. 1
      src/generators/defaultGenerators.js

6
src/component/FlexContainerComponent.js

@ -83,8 +83,8 @@ class FlexContainerComponent extends Component {
* @inheritdoc * @inheritdoc
* @extends Component.generate() * @extends Component.generate()
*/ */
generate(modifier = null, styleStore = null, functionStore = null) { generate(generator = singlepage, modifier = null, styleStore = null, functionStore = null) {
if (this._children && this._children.length > 0) { if (this._children && this._children.length > 1) {
if (this._distributeEvenglyAfterGenerate) { if (this._distributeEvenglyAfterGenerate) {
let childDistributionFraction = Math.floor( let childDistributionFraction = Math.floor(
@ -105,6 +105,6 @@ class FlexContainerComponent extends Component {
} }
} }
return super.generate(modifier, styleStore, functionStore); return super.generate(generator, modifier, styleStore, functionStore);
} }
} }

1
src/generators/defaultGenerators.js

@ -0,0 +1 @@
const singlepage = new CompelGenerator();
Loading…
Cancel
Save