Skip to content

Commit cdca297

Browse files
author
Lukasz Borowiec
committed
#612: Multiple row with the parallax background does not render correctly after toggle a screen mode several times - added rebuild parallax function
1 parent 7ef5f37 commit cdca297

File tree

2 files changed

+33
-6
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+33
-6
lines changed

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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ export default class Preview extends PreviewCollection {
132132
this.buildJarallax();
133133
}
134134
});
135+
136+
events.on(
137+
`stage:${this.contentType.stageId}:fullScreenModeChangeAfter`,
138+
this.toggleFullScreen.bind(this),
139+
);
140+
}
141+
142+
/**
143+
* Toggle fullscreen
144+
*/
145+
public toggleFullScreen()
146+
{
147+
if ($(this.element).hasClass("jarallax")) {
148+
this.buildJarallax();
149+
}
135150
}
136151

137152
/**

0 commit comments

Comments
 (0)