Explorar el Código

Should not set background image in the cover mode.

NaotoshiFujita hace 3 años
padre
commit
b2bbe8b12d

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
dist/js/splide-renderer.min.js


+ 1 - 1
dist/js/splide.cjs.js

@@ -2696,7 +2696,7 @@ class SplideRenderer {
   }
   cover(content) {
     const { styles, html = "" } = content;
-    if (this.options.cover) {
+    if (this.options.cover && !this.options.lazyLoad) {
       const src = html.match(/<img.*?src\s*=\s*(['"])(.+?)\1.*?>/);
       if (src && src[2]) {
         styles.background = `center/cover no-repeat url('${src[2]}')`;

+ 1 - 1
dist/js/splide.esm.js

@@ -2692,7 +2692,7 @@ class SplideRenderer {
   }
   cover(content) {
     const { styles, html = "" } = content;
-    if (this.options.cover) {
+    if (this.options.cover && !this.options.lazyLoad) {
       const src = html.match(/<img.*?src\s*=\s*(['"])(.+?)\1.*?>/);
       if (src && src[2]) {
         styles.background = `center/cover no-repeat url('${src[2]}')`;

+ 1 - 1
src/js/renderer/SplideRenderer/SplideRenderer.ts

@@ -589,7 +589,7 @@ export class SplideRenderer {
   private cover( content: SlideContent ): void {
     const { styles, html = '' } = content;
 
-    if ( this.options.cover ) {
+    if ( this.options.cover && ! this.options.lazyLoad ) {
       const src = html.match( /<img.*?src\s*=\s*(['"])(.+?)\1.*?>/ );
 
       if ( src && src[ 2 ] ) {

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio