소스 검색

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() {
-    return options.autoWidth ? "" : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
+    return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
   }
 
   function cssSlideHeight() {
-    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? "" : cssSlideSize() : cssHeight());
+    return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
   }
 
   function cssSlideSize() {

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

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

+ 2 - 2
dist/js/splide.js

@@ -1227,11 +1227,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
     }
 
     function cssSlideWidth() {
-      return options.autoWidth ? "" : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
+      return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize());
     }
 
     function cssSlideHeight() {
-      return unit(options.fixedHeight) || (vertical ? options.autoHeight ? "" : cssSlideSize() : cssHeight());
+      return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight());
     }
 
     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.
    */
-  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.
    */
-  function cssSlideHeight(): string {
+  function cssSlideHeight(): string | null {
     return unit( options.fixedHeight )
-      || ( vertical ? ( options.autoHeight ? '' : cssSlideSize() ) : cssHeight() );
+      || ( vertical ? ( options.autoHeight ? null : cssSlideSize() ) : cssHeight() );
   }
 
   /**

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.