Skip to content

Commit

Permalink
Improve the drag performance. Add the useScroll option.
Browse files Browse the repository at this point in the history
  • Loading branch information
NaotoshiFujita committed Oct 9, 2021
1 parent 81fdec6 commit 56ca26d
Show file tree
Hide file tree
Showing 67 changed files with 825 additions and 1,062 deletions.
4 changes: 2 additions & 2 deletions dist/js/splide-renderer.min.js

Large diffs are not rendered by default.

321 changes: 156 additions & 165 deletions dist/js/splide.cjs.js

Large diffs are not rendered by default.

321 changes: 156 additions & 165 deletions dist/js/splide.esm.js

Large diffs are not rendered by default.

386 changes: 184 additions & 202 deletions dist/js/splide.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/splide.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/js/splide.min.js

Large diffs are not rendered by default.

Binary file modified dist/js/splide.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/types/components/Clones/Clones.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/types/components/Controller/Controller.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import { AnyFunction, BaseComponent, Components, Options } from '../../types';
*/
export interface ControllerComponent extends BaseComponent {
go(control: number | string, allowSameIndex?: boolean, callback?: AnyFunction): void;
scroll(destination: number, useIndex?: boolean, snap?: boolean, duration?: number, callback?: AnyFunction): void;
getNext(destination?: boolean): number;
getPrev(destination?: boolean): number;
getEnd(): number;
setIndex(index: number): void;
getIndex(prev?: boolean): number;
toIndex(page: number): number;
toPage(index: number): number;
toDest(position: number): number;
hasFocus(): boolean;
}
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/Controller/Controller.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/types/components/Drag/Drag.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/types/components/Elements/Elements.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/types/components/Layout/Layout.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/types/components/Move/Move.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface MoveComponent extends BaseComponent {
move(dest: number, index: number, prev: number, callback?: AnyFunction): void;
jump(index: number): void;
translate(position: number, preventLoop?: boolean): void;
shift(position: number, backwards: boolean): number;
cancel(): void;
toIndex(position: number): number;
toPosition(index: number, trimming?: boolean): number;
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/Move/Move.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/types/components/Scroll/Scroll.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Splide } from '../../core/Splide/Splide';
import { BaseComponent, Components, Options } from '../../types';
import { AnyFunction, BaseComponent, Components, Options } from '../../types';
/**
* The interface for the Scroll component.
*
* @since 3.0.0
*/
export interface ScrollComponent extends BaseComponent {
scroll(position: number, duration?: number): void;
scroll(position: number, duration?: number, callback?: AnyFunction): void;
cancel(): void;
}
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/Scroll/Scroll.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/types/components/Slides/Slide.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface SlideComponent extends BaseComponent {
slide: HTMLElement;
container: HTMLElement;
isClone: boolean;
rule(prop: string, value: string | number, useContainer?: boolean): void;
style(prop: string, value: string | number, useContainer?: boolean): void;
isWithin(from: number, distance: number): boolean;
}
/**
Expand All @@ -21,7 +21,7 @@ export interface SlideComponent extends BaseComponent {
*
* @param Splide - A Splide instance.
* @param index - A slide index.
* @param slideIndex - A slide index for clones. This must be `-1` if the slide is not clone.
* @param slideIndex - A slide index for clones. This must be `-1` if the slide is not a clone.
* @param slide - A slide element.
*
* @return A Slide sub component.
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/Slides/Slide.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/types/components/Slides/Slides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface SlidesComponent extends BaseComponent {
remove(selector: SlideMatcher): void;
forEach(iteratee: SlidesIteratee, excludeClones?: boolean): void;
filter(matcher: SlideMatcher): SlideComponent[];
rule(prop: string, value: string | number, useContainer?: boolean): void;
style(prop: string, value: string | number, useContainer?: boolean): void;
getLength(excludeClones?: boolean): number;
isEnough(): boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/Slides/Slides.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions dist/types/components/Style/Style.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/types/components/Style/Style.d.ts.map

This file was deleted.

3 changes: 1 addition & 2 deletions dist/types/components/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
export { Options } from './Options/Options';
export { Direction } from './Direction/Direction';
export { Elements } from './Elements/Elements';
export { Style } from './Style/Style';
export { Slides } from './Slides/Slides';
export { Clones } from './Clones/Clones';
export { Layout } from './Layout/Layout';
export { Clones } from './Clones/Clones';
export { Move } from './Move/Move';
export { Controller } from './Controller/Controller';
export { Arrows } from './Arrows/Arrows';
Expand Down
2 changes: 1 addition & 1 deletion dist/types/components/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 56ca26d

Please sign in to comment.