فهرست منبع

Bug Fix: Slide width and height should be `null` for auto sizing.

NaotoshiFujita 3 سال پیش
والد
کامیت
eed205801b
7فایلهای تغییر یافته به همراه10 افزوده شده و 10 حذف شده
  1. 2 2
      dist/js/splide.cjs.js
  2. 2 2
      dist/js/splide.esm.js
  3. 2 2
      dist/js/splide.js
  4. 0 0
      dist/js/splide.min.js
  5. BIN
      dist/js/splide.min.js.gz
  6. 0 0
      dist/js/splide.min.js.map
  7. 4 4
      src/js/components/Layout/Layout.ts

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

@@ -1233,11 +1233,11 @@ function Layout(Splide2, Components2, options) {
   }
   }
 
 
   function cssSlideWidth() {
   function cssSlideWidth() {
-    return options.autoWidth ? "" : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
+    return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
   }
   }
 
 
   function cssSlideHeight() {
   function cssSlideHeight() {
-    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? "" : cssSlideSize() : cssHeight());
+    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
   }
   }
 
 
   function cssSlideSize() {
   function cssSlideSize() {

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

@@ -1228,11 +1228,11 @@ function Layout(Splide2, Components2, options) {
   }
   }
 
 
   function cssSlideWidth() {
   function cssSlideWidth() {
-    return options.autoWidth ? "" : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
+    return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
   }
   }
 
 
   function cssSlideHeight() {
   function cssSlideHeight() {
-    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? "" : cssSlideSize() : cssHeight());
+    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
   }
   }
 
 
   function cssSlideSize() {
   function cssSlideSize() {

+ 2 - 2
dist/js/splide.js

@@ -1227,11 +1227,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
     }
     }
 
 
     function cssSlideWidth() {
     function cssSlideWidth() {
-      return options.autoWidth ? "" : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
+      return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
     }
     }
 
 
     function cssSlideHeight() {
     function cssSlideHeight() {
-      return unit(options.fixedHeight) || (vertical ? options.autoHeight ? "" : cssSlideSize() : cssHeight());
+      return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
     }
     }
 
 
     function cssSlideSize() {
     function cssSlideSize() {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/js/splide.min.js


BIN
dist/js/splide.min.js.gz


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/js/splide.min.js.map


+ 4 - 4
src/js/components/Layout/Layout.ts

@@ -135,8 +135,8 @@ export function Layout( Splide: Splide, Components: Components, options: Options
    *
    *
    * @return The width of the slide.
    * @return The width of the slide.
    */
    */
-  function cssSlideWidth(): string {
-    return options.autoWidth ? '' : unit( options.fixedWidth ) || ( vertical ? '' : cssSlideSize() );
+  function cssSlideWidth(): string | null {
+    return options.autoWidth ? null : unit( options.fixedWidth ) || ( vertical ? '' : cssSlideSize() );
   }
   }
 
 
   /**
   /**
@@ -144,9 +144,9 @@ export function Layout( Splide: Splide, Components: Components, options: Options
    *
    *
    * @return The height of the slide.
    * @return The height of the slide.
    */
    */
-  function cssSlideHeight(): string {
+  function cssSlideHeight(): string | null {
     return unit( options.fixedHeight )
     return unit( options.fixedHeight )
-      || ( vertical ? ( options.autoHeight ? '' : cssSlideSize() ) : cssHeight() );
+      || ( vertical ? ( options.autoHeight ? null : cssSlideSize() ) : cssHeight() );
   }
   }
 
 
   /**
   /**

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است