Bladeren bron

Should not set background image in the cover mode.

NaotoshiFujita 3 jaren geleden
bovenliggende
commit
b2bbe8b12d

File diff suppressed because it is too large
+ 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 ] ) {

Some files were not shown because too many files changed in this diff