fix lazy loading bug related to data-background-image attribute
parent
fa2413ec73
commit
fcec8d058d
|
@ -613,7 +613,7 @@
|
||||||
if( data.background ) {
|
if( data.background ) {
|
||||||
// Auto-wrap image urls in url(...)
|
// Auto-wrap image urls in url(...)
|
||||||
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) {
|
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) {
|
||||||
slide.setAttribute( 'data-background-image', 'url('+ data.background +')' );
|
slide.setAttribute( 'data-background-image', data.background );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
element.style.background = data.background;
|
element.style.background = data.background;
|
||||||
|
@ -2336,7 +2336,7 @@
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
if( backgroundImage ) {
|
if( backgroundImage ) {
|
||||||
background.style.backgroundImage = backgroundImage;
|
background.style.backgroundImage = 'url('+ backgroundImage +')';
|
||||||
}
|
}
|
||||||
// Videos
|
// Videos
|
||||||
else if ( backgroundVideo ) {
|
else if ( backgroundVideo ) {
|
||||||
|
|
Loading…
Reference in New Issue