File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed
app/code/Magento/PageBuilder/view
base/web/js/content-type/slide/appearance/default Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,11 @@ export default class Preview extends BasePreview {
137
137
super ( contentType , config , observableUpdater ) ;
138
138
139
139
this . contentType . dataStore . subscribe ( this . buildJarallax ) ;
140
- events . on ( "row :mountAfter" , ( args : ContentTypeReadyEventParamsInterface ) => {
140
+ events . on ( "slide :mountAfter" , ( args : ContentTypeReadyEventParamsInterface ) => {
141
141
if ( args . id === this . contentType . id ) {
142
142
this . buildJarallax ( ) ;
143
143
}
144
144
} ) ;
145
- events . on ( "contentType:mountAfter" , ( args : ContentTypeMountEventParamsInterface ) => {
146
- if ( args . contentType . parentContentType && args . contentType . parentContentType . id === this . contentType . id ) {
147
- this . buildJarallax ( ) ;
148
- }
149
- } ) ;
150
145
}
151
146
152
147
/**
Original file line number Diff line number Diff line change @@ -11,16 +11,15 @@ define([
11
11
12
12
return function ( config , element ) {
13
13
var videoElement = element [ 0 ] . querySelector ( '[data-background-type=video]' ) ,
14
- $slider = null ,
15
- currentVideoSlide = null ;
14
+ $slider = null ;
16
15
17
16
showOnHover ( config ) ;
18
17
19
18
if ( videoElement ) {
20
19
$slider = $ ( element ) . closest ( '[data-content-type=slider]' ) ;
21
20
videoBackground ( config , videoElement ) ;
22
21
$slider . on ( 'setPosition' , function ( event , slick ) {
23
- currentVideoSlide = slick . $slides [ slick . currentSlide ] . querySelector ( '.jarallax' ) ;
22
+ var currentVideoSlide = slick . $slides [ slick . currentSlide ] . querySelector ( '.jarallax' ) ;
24
23
25
24
if ( currentVideoSlide . jarallax . options . videoPlayOnlyVisible ) {
26
25
currentVideoSlide . jarallax . video . play ( ) ;
@@ -31,7 +30,7 @@ define([
31
30
}
32
31
} ) ;
33
32
$slider . on ( 'beforeChange' , function ( event , slick ) {
34
- currentVideoSlide = slick . $slides [ slick . currentSlide ] . querySelector ( '.jarallax' ) ;
33
+ var currentVideoSlide = slick . $slides [ slick . currentSlide ] . querySelector ( '.jarallax' ) ;
35
34
36
35
if ( currentVideoSlide . jarallax . options . videoPlayOnlyVisible ) {
37
36
currentVideoSlide . jarallax . video . pause ( ) ;
You can’t perform that action at this time.
0 commit comments