|
@@ -68,14 +68,14 @@ export default ( Splide, Components, options ) => {
|
|
init() {
|
|
init() {
|
|
const { top = 0, bottom = 0 } = options.padding;
|
|
const { top = 0, bottom = 0 } = options.padding;
|
|
|
|
|
|
- applyStyle( track, {
|
|
|
|
- paddingTop : unit( top ),
|
|
|
|
- paddingBottom: unit( bottom ),
|
|
|
|
- } );
|
|
|
|
|
|
+ applyStyle( track, { paddingTop: unit( top ), paddingBottom: unit( bottom ) } );
|
|
|
|
|
|
const firstSlide = Elements.slides[ 0 ];
|
|
const firstSlide = Elements.slides[ 0 ];
|
|
|
|
+ const position = firstSlide.style.position;
|
|
const { fixedWidth: fixedW, fixedHeight: fixedH, height } = options;
|
|
const { fixedWidth: fixedW, fixedHeight: fixedH, height } = options;
|
|
|
|
|
|
|
|
+ applyStyle( firstSlide, { position: 'absolute' } );
|
|
|
|
+
|
|
if ( fixedW ) {
|
|
if ( fixedW ) {
|
|
applyStyle( firstSlide, { width: unit( fixedW ) } );
|
|
applyStyle( firstSlide, { width: unit( fixedW ) } );
|
|
fixedWidth = parseFloat( getComputedStyle( firstSlide ).width );
|
|
fixedWidth = parseFloat( getComputedStyle( firstSlide ).width );
|
|
@@ -86,6 +86,8 @@ export default ( Splide, Components, options ) => {
|
|
fixedHeight = parseFloat( getComputedStyle( firstSlide ).height );
|
|
fixedHeight = parseFloat( getComputedStyle( firstSlide ).height );
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ applyStyle( firstSlide, { position } );
|
|
|
|
+
|
|
if ( height ) {
|
|
if ( height ) {
|
|
const list = Elements.list;
|
|
const list = Elements.list;
|
|
applyStyle( list, { height: unit( height ) } );
|
|
applyStyle( list, { height: unit( height ) } );
|