Skip to content

Commit d68faef

Browse files
committed
PB-266: Video background for Slide
1 parent 842e0e1 commit d68faef

File tree

2 files changed

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

2 files changed

+8
-8
lines changed

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

Lines changed: 4 additions & 4 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/slide/preview.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export default class Preview extends BasePreview {
519519
this.contentType.dataStore.subscribe(function(data: DataObject) {
520520
this.slideName(data.slide_name);
521521

522-
if (this.isVideoShouldBeUpdated(data)) {
522+
if (this.shouldUpdateVideo(data)) {
523523
this.buildJarallax();
524524
}
525525
}.bind(this));
@@ -558,12 +558,12 @@ export default class Preview extends BasePreview {
558558
}
559559

560560
/**
561-
* Check if video background should be rebuilt
561+
* Check if video options has been updated.
562562
*
563563
* @return boolean
564564
*/
565-
private isVideoShouldBeUpdated(state: DataObject): boolean {
566-
const previousState = this.contentType.dataStore.previousState;
565+
private shouldUpdateVideo(state: DataObject): boolean {
566+
const previousState = this.contentType.dataStore.getPreviousState();
567567
const diff = mageUtils.compare(previousState, state).changes;
568568

569569
if (diff.length > 0) {

0 commit comments

Comments
 (0)