Skip to content

Commit 578ba38

Browse files
committed
MC-2363: Add vertical alignment and min height to row configuration
- fix issue with tab contents rendering when not using render template
1 parent 7202b46 commit 578ba38

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/preview-collection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
-->
77

8-
<div class="element-children content-type-container" each="parent.getChildren()" css="getChildrenCss()" attr="{id: parent.id + '-children'}" data-bind="sortable: getSortableOptions()" afterRender="function (element) { if (typeof afterChildrenRender === 'function') { afterChildrenRender(element); } }">
8+
<div class="element-children content-type-container" each="parent.getChildren()" ko-style="data.hasOwnProperty('container') ? data.container.style : {}" css="getChildrenCss()" attr="{id: parent.id + '-children'}" data-bind="sortable: getSortableOptions()" afterRender="function (element) { if (typeof afterChildrenRender === 'function') { afterChildrenRender(element); } }">
99
<if args="$parent.isContainer()">
1010
<div class="pagebuilder-drop-indicator"></div>
1111
</if>

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/row/default/preview.html

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@
66
-->
77

88
<div class="pagebuilder-content-type type-container pagebuilder-row children-min-height" data-bind="attr: data.main.attributes, style: data.main.style, css: Object.assign(data.main.css(), {'empty-container': parent.children().length == 0, 'jarallax': data.main.attributes()['data-enable-parallax'] == 1}), event: {mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false, afterRender: function (element) { setTimeout(function () { initParallax.call($data, element); }, 0) }">
9-
<render args="getOptions().template"></render>
10-
<div class="element-children content-type-container" each="parent.getChildren()" ko-style="data.container.style" css="getChildrenCss()" attr="{id: parent.id + '-children'}" data-bind="sortable: getSortableOptions()" afterRender="function (element) { if (typeof afterChildrenRender === 'function') { afterChildrenRender(element); } }">
11-
<if args="$parent.isContainer()">
12-
<div class="pagebuilder-drop-indicator"></div>
13-
</if>
14-
<div class="pagebuilder-content-type-wrapper" template="{ name: preview.previewTemplate, data: preview, afterRender: function () { preview.dispatchAfterRenderEvent.apply(preview, arguments); } }" attr="{ id: id }"></div>
15-
<if args="$parent.isContainer() && $index() === $parent.parent.getChildren()().length - 1">
16-
<div class="pagebuilder-drop-indicator"></div>
17-
</if>
18-
</div>
9+
<render args="getOptions().template"/>
10+
<render args="previewChildTemplate"/>
1911
<div class="pagebuilder-display-label" data-bind="text: function () { return displayLabel().toUpperCase(); }()"></div>
2012
<div class="pagebuilder-empty-container empty-placeholder" data-bind="css: {visible: parent.children().length == 0}, i18n: 'Drag content types or columns here'"></div>
2113
</div>

0 commit comments

Comments
 (0)