Browse Source

Bug Fix: Remove position instead of setting "static".

NaotoshiFujita 5 năm trước cách đây
mục cha
commit
82829ca841

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/js/splide.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "1.0.9",
+  "version": "1.0.10",
   "description": "Splide is a lightweight and powerful slider without any dependencies.",
   "author": "Naotoshi Fujita",
   "license": "MIT",

+ 1 - 1
src/js/components/layout/resolvers/horizontal.js

@@ -74,7 +74,7 @@ export default ( Splide, Components, options ) => {
 			const firstSlide = Elements.slides[ 0 ];
 			const width      = options.fixedWidth;
 			const height     = options.height || options.fixedHeight;
-			const position   = firstSlide.style.position || 'static';
+			const position   = firstSlide.style.position;
 
 			applyStyle( firstSlide, { position: 'absolute' } );
 

+ 1 - 1
src/js/components/layout/resolvers/vertical.js

@@ -71,7 +71,7 @@ export default ( Splide, Components, options ) => {
 			applyStyle( track, { paddingTop: unit( top ), paddingBottom: unit( bottom ) } );
 
 			const firstSlide = Elements.slides[ 0 ];
-			const position   = firstSlide.style.position || 'static';
+			const position   = firstSlide.style.position;
 			const { fixedWidth: fixedW, fixedHeight: fixedH, height } = options;
 
 			applyStyle( firstSlide, { position: 'absolute' } );

+ 1 - 1
src/js/utils/dom.js

@@ -68,7 +68,7 @@ export function create( tag, attrs ) {
 export function applyStyle( elm, styles ) {
 	if ( elm ) {
 		each( styles, ( value, prop ) => {
-			elm.style[ prop ] = value || null;
+			elm.style[ prop ] = value || '';
 		} );
 	}
 }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác