Skip to content

Commit b3a127b

Browse files
Bug Fix: Should not remove the predefined inline styles of slides.
1 parent da6cf79 commit b3a127b

File tree

11 files changed

+23
-16
lines changed

11 files changed

+23
-16
lines changed

dist/js/splide-renderer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/splide.cjs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Splide.js
3-
* Version : 3.1.1
3+
* Version : 3.1.2
44
* License : MIT
55
* Copyright: 2021 Naotoshi Fujita
66
*/
@@ -1020,7 +1020,7 @@ function Layout(Splide2, Components2, options) {
10201020
emit(EVENT_RESIZED);
10211021
}
10221022
function setSlidesHeight() {
1023-
Slides.style("height", cssSlideHeight(), true);
1023+
Slides.style("height", cssSlideHeight() || null, true);
10241024
}
10251025
function cssPadding(right) {
10261026
const { padding } = options;

dist/js/splide.esm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Splide.js
3-
* Version : 3.1.1
3+
* Version : 3.1.2
44
* License : MIT
55
* Copyright: 2021 Naotoshi Fujita
66
*/
@@ -1016,7 +1016,7 @@ function Layout(Splide2, Components2, options) {
10161016
emit(EVENT_RESIZED);
10171017
}
10181018
function setSlidesHeight() {
1019-
Slides.style("height", cssSlideHeight(), true);
1019+
Slides.style("height", cssSlideHeight() || null, true);
10201020
}
10211021
function cssPadding(right) {
10221022
const { padding } = options;

dist/js/splide.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/splide.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/splide.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/splide.min.js.gz

3 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splidejs/splide",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.",
55
"author": "Naotoshi Fujita",
66
"license": "MIT",

src/js/components/Drag/test/general.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe( 'Drag', () => {
99
const track = splide.Components.Elements.track;
1010

1111
fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
12-
fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
12+
fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
1313
fireWithCoord( window, 'mousemove', { x: -100, timeStamp: 2 } );
1414

1515
expect( splide.Components.Move.getPosition() ).toBe( -100 );
@@ -24,7 +24,7 @@ describe( 'Drag', () => {
2424
const track = splide.Components.Elements.track;
2525

2626
fireWithCoord( track, 'mousedown', { x: 0 } );
27-
fireWithCoord( window, 'mousemove', { x: 0 } );
27+
fireWithCoord( window, 'mousemove', { x: 1 } );
2828
fireWithCoord( window, 'mouseup' );
2929

3030
expect( splide.Components.Move.getPosition() ).toBe( 0 );
@@ -40,7 +40,7 @@ describe( 'Drag', () => {
4040
const track = splide.Components.Elements.track;
4141

4242
fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
43-
fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
43+
fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
4444
fireWithCoord( window, 'mousemove', { x: -20, timeStamp: 21 } ); // v = -1
4545
fireWithCoord( window, 'mouseup', { x: -20, timeStamp: 21 } );
4646

@@ -53,7 +53,7 @@ describe( 'Drag', () => {
5353
const track = splide.Components.Elements.track;
5454

5555
fireWithCoord( track, 'mousedown', { x: 0, timeStamp: 1 } );
56-
fireWithCoord( window, 'mousemove', { x: 0, timeStamp: 1 } );
56+
fireWithCoord( window, 'mousemove', { x: 1, timeStamp: 1 } );
5757
fireWithCoord( window, 'mousemove', { x: -20, timeStamp: 100 } );
5858
fireWithCoord( window, 'mouseup', { x: -20, timeStamp: 100 } );
5959

src/js/components/Layout/Layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function Layout( Splide: Splide, Components: Components, options: Options
8383
* Updates the height of slides or their container elements if available.
8484
*/
8585
function setSlidesHeight(): void {
86-
Slides.style( 'height', cssSlideHeight(), true );
86+
Slides.style( 'height', cssSlideHeight() || null, true );
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)