@@ -1429,7 +1429,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
var shouldSnap = true;
function mount() {
- on([EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition, DEFAULT_EVENT_PRIORITY - 1);
+ if (!Splide2.is(FADE)) {
+ on([EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition, DEFAULT_EVENT_PRIORITY - 1);
+ }
}
function reposition() {
@@ -0,0 +1,10 @@
+/**
+ * Attempts to convert the provided value to pixel as the relative value to the parent element.
+ *
+ * @param parent - A parent element.
+ * @param value - A value to convert.
+ * @return A converted value in pixel. Unhandled values will become 0.
+ */
+export declare function measure(parent: HTMLElement, value: number | string): number;
+//# sourceMappingURL=../../../../../src/js/utils/dom/measure/measure.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["measure.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAI,MAAM,CAQ7E"}
@@ -1,7 +1,7 @@
import { EVENT_MOVE, EVENT_MOVED, EVENT_REFRESH, EVENT_RESIZED, EVENT_UPDATED } from '../../constants/events';
import { DEFAULT_EVENT_PRIORITY } from '../../constants/priority';
import { IDLE, MOVING } from '../../constants/states';
-import { LOOP, SLIDE } from '../../constants/types';
+import { FADE, LOOP, SLIDE } from '../../constants/types';
import { EventInterface } from '../../constructors';
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
@@ -58,7 +58,9 @@ export function Move( Splide: Splide, Components: Components, options: Options )
* Called when the component is mounted.
*/
function mount(): void {
- on( [ EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH ], reposition, DEFAULT_EVENT_PRIORITY - 1 );
+ if ( ! Splide.is( FADE ) ) {
+ on( [ EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH ], reposition, DEFAULT_EVENT_PRIORITY - 1 );
/**