Skip to content

Commit 142ecdd

Browse files
committed
MC-2363: Add vertical alignment and min height to row configuration
- apply main and container styles to master and preview templates
1 parent d879e2e commit 142ecdd

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
-->
77

8-
<div data-bind="attr: data.main.attributes, style: data.main.style, css: data.main.css">
9-
<!-- ko template: renderChildTemplate --><!-- /ko -->
8+
<div attr="data.main.attributes"
9+
ko-style="Object.assign(data.container.style(), data.main.style())"
10+
css="data.main.css">
11+
<render args="renderChildTemplate"/>
1012
</div>

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
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) }">
99
<!-- ko template: getOptions().template --><!-- /ko -->
10-
<!-- ko template: previewChildTemplate --><!-- /ko -->
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>
1119
<div class="pagebuilder-display-label" data-bind="text: function () { return displayLabel().toUpperCase(); }()"></div>
1220
<div class="pagebuilder-empty-container empty-placeholder" data-bind="css: {visible: parent.children().length == 0}, i18n: 'Drag content types or columns here'"></div>
1321
</div>

0 commit comments

Comments
 (0)