Skip to content

Commit 25a97f3

Browse files
Merge branch '612_parallax_do_not_render_correctly_after_toggle_a_screen_mode' of github.com:magento/magento2-page-builder into 609_content-type-toolbar-fullscreen-fix
2 parents e46f054 + a26f58f commit 25a97f3

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowBackgroundAttributeTest/RowContainedValidateParallaxVideoBackground.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
6666
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
6767
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
68+
<argument name="expectedPosition" value="position: absolute;"/>
6869
</actionGroup>
6970
<actionGroup ref="validateRowParallaxBackgroundAttributes" stepKey="validateParallaxStorefront" before="validateStorefront">
7071
<argument name="page" value="RowOnStorefront"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowBackgroundAttributeTest/RowFullBleedValidateParallaxVideoBackground.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
6969
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
7070
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
71+
<argument name="expectedPosition" value="position: absolute;"/>
7172
</actionGroup>
7273
<actionGroup ref="validateRowParallaxBackgroundAttributes" stepKey="validateParallaxStorefront" before="validateStorefront">
7374
<argument name="page" value="RowOnStorefront_FullWidth_FullBleed"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowBackgroundAttributeTest/RowFullWidthValidateParallaxVideoBackground.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
<argument name="lazyLoad" value="PageBuilderVideoBackgroundLazyLoad_Enabled"/>
6969
<argument name="playOnlyWhenVisible" value="PageBuilderVideoBackgroundPlayOnlyWhenVisible_Enabled"/>
7070
<argument name="fallbackImage" value="PageBuilderVideoBackgroundFallbackImage_JPG"/>
71+
<argument name="expectedPosition" value="position: absolute;"/>
7172
</actionGroup>
7273
<actionGroup ref="validateRowParallaxBackgroundAttributes" stepKey="validateParallaxStorefront" before="validateStorefront">
7374
<argument name="page" value="RowOnStorefront_FullWidth_FullBleed"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/row/preview.js

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/row/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,20 @@ export default class Preview extends PreviewCollection {
132132
this.buildJarallax();
133133
}
134134
});
135+
events.on(
136+
`stage:${this.contentType.stageId}:fullScreenModeChangeAfter`,
137+
this.toggleFullScreen.bind(this),
138+
);
139+
}
140+
141+
/**
142+
* Toggle fullscreen
143+
*/
144+
public toggleFullScreen()
145+
{
146+
if ($(this.element).hasClass("jarallax")) {
147+
this.buildJarallax();
148+
}
135149
}
136150

137151
/**

0 commit comments

Comments
 (0)