Преглед на файлове

Bug Fix: Should not remove the predefined inline styles of slides.

NaotoshiFujita преди 3 години
родител
ревизия
b3a127ba3d

+ 1 - 1
dist/js/splide-renderer.min.js

@@ -1,6 +1,6 @@
 /*!
  * Splide.js
- * Version  : 3.1.1
+ * Version  : 3.1.2
  * License  : MIT
  * Copyright: 2021 Naotoshi Fujita
  */

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

@@ -1,6 +1,6 @@
 /*!
  * Splide.js
- * Version  : 3.1.1
+ * Version  : 3.1.2
  * License  : MIT
  * Copyright: 2021 Naotoshi Fujita
  */
@@ -1020,7 +1020,7 @@ function Layout(Splide2, Components2, options) {
     emit(EVENT_RESIZED);
   }
   function setSlidesHeight() {
-    Slides.style("height", cssSlideHeight(), true);
+    Slides.style("height", cssSlideHeight() || null, true);
   }
   function cssPadding(right) {
     const { padding } = options;

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

@@ -1,6 +1,6 @@
 /*!
  * Splide.js
- * Version  : 3.1.1
+ * Version  : 3.1.2
  * License  : MIT
  * Copyright: 2021 Naotoshi Fujita
  */
@@ -1016,7 +1016,7 @@ function Layout(Splide2, Components2, options) {
     emit(EVENT_RESIZED);
   }
   function setSlidesHeight() {
-    Slides.style("height", cssSlideHeight(), true);
+    Slides.style("height", cssSlideHeight() || null, true);
   }
   function cssPadding(right) {
     const { padding } = options;

+ 2 - 2
dist/js/splide.js

@@ -4,7 +4,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
 
 /*!
  * Splide.js
- * Version  : 3.1.1
+ * Version  : 3.1.2
  * License  : MIT
  * Copyright: 2021 Naotoshi Fujita
  */
@@ -1186,7 +1186,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
     }
 
     function setSlidesHeight() {
-      Slides.style("height", cssSlideHeight(), true);
+      Slides.style("height", cssSlideHeight() || null, true);
     }
 
     function cssPadding(right) {

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
dist/js/splide.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/js/splide.min.js


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


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "3.1.1",
+  "version": "3.1.2",
   "description": "Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.",
   "author": "Naotoshi Fujita",
   "license": "MIT",

+ 4 - 4
src/js/components/Drag/test/general.test.ts

@@ -9,7 +9,7 @@ describe( 'Drag', () => {
     const track  = splide.Components.Elements.track;
 
     fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
-    fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
+    fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
     fireWithCoord( window, 'mousemove', { x: -100, timeStamp: 2 } );
 
     expect( splide.Components.Move.getPosition() ).toBe( -100 );
@@ -24,7 +24,7 @@ describe( 'Drag', () => {
     const track  = splide.Components.Elements.track;
 
     fireWithCoord( track, 'mousedown', { x: 0 } );
-    fireWithCoord( window, 'mousemove', { x: 0 } );
+    fireWithCoord( window, 'mousemove', { x: 1 } );
     fireWithCoord( window, 'mouseup' );
 
     expect( splide.Components.Move.getPosition() ).toBe( 0 );
@@ -40,7 +40,7 @@ describe( 'Drag', () => {
     const track  = splide.Components.Elements.track;
 
     fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
-    fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
+    fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
     fireWithCoord( window, 'mousemove', { x: -20, timeStamp: 21 } ); // v = -1
     fireWithCoord( window, 'mouseup',   { x: -20, timeStamp: 21 } );
 
@@ -53,7 +53,7 @@ describe( 'Drag', () => {
     const track  = splide.Components.Elements.track;
 
     fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
-    fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
+    fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
     fireWithCoord( window, 'mousemove', { x: -20, timeStamp: 100 } );
     fireWithCoord( window, 'mouseup',   { x: -20, timeStamp: 100 } );
 

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

@@ -83,7 +83,7 @@ export function Layout( Splide: Splide, Components: Components, options: Options
    * Updates the height of slides or their container elements if available.
    */
   function setSlidesHeight(): void {
-    Slides.style( 'height', cssSlideHeight(), true );
+    Slides.style( 'height', cssSlideHeight() || null, true );
   }
 
   /**

+ 7 - 0
src/js/test/php/examples/autoHeight.php

@@ -23,11 +23,18 @@ $settings = get_settings();
         autoHeight: true,
         gap       : '1rem',
         trimSpace : 'move',
+        focus     : 'center',
       } );
 
       splide.mount();
     } );
   </script>
+
+  <style>
+    .splide__slide {
+      overflow: hidden;
+    }
+  </style>
 </head>
 <body>
 

Някои файлове не бяха показани, защото твърде много файлове са промени