Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
refactor: rename slideStart to slideDidChange
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Nov 28, 2018
1 parent cd56d20 commit 90df088
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions doc/features/extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ await deck.print();

| Event | Emitted value | Description |
| -------------------------- |:-----------------:|:-----------------:|
| slideNextStart | number | Emitted when the next slide has started. Emit the index of the new active slide. |
| slidePrevStart | number | Emitted when the previous slide has ended. Emit the index of the new active slide. |
| slideNextDidChange | number | Emitted when the next slide has started. Emit the index of the new active slide. |
| slidePrevDidChange | number | Emitted when the previous slide has ended. Emit the index of the new active slide. |
| slideDrag | number | Emitted when the slider is actively being moved. Emit the transformX value of the deck. |
| slideWillChange | number | Emitted before the active slide has changed. Emit the transformX value of the deck. |

Expand Down
4 changes: 2 additions & 2 deletions doc/features/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const deck = document.getElementsByTagName('deckgo-deck');
await deck.slideNext();
```

*Optional parameter:* Optionally your could provide a boolean parameter to this method in case you would not like the event `slideNextStart` and `slidePrevStart` to be fired.
*Optional parameter:* Optionally your could provide a boolean parameter to this method in case you would not like the event `slideNextDidChange` and `slidePrevDidChange` to be fired.

```
await deck.slideNext(false);
Expand All @@ -44,7 +44,7 @@ await deck.slideNext(false);
await deck.slidePrev();
```

*Optional parameter:* Optionally your could provide a boolean parameter to this method in case you would not like the event `slideNextStart` and `slidePrevStart` to be fired.
*Optional parameter:* Optionally your could provide a boolean parameter to this method in case you would not like the event `slideNextDidChange` and `slidePrevDidChange` to be fired.

```
await deck.slidePrev(false);
Expand Down
8 changes: 4 additions & 4 deletions src/components/deck/deckdeckgo-deck/deckdeckgo-deck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export class DeckdeckgoDeck {
@State()
private length: number = 0;

@Event() slideNextStart: EventEmitter<number>;
@Event() slidePrevStart: EventEmitter<number>;
@Event() slideNextDidChange: EventEmitter<number>;
@Event() slidePrevDidChange: EventEmitter<number>;
@Event() slideDrag: EventEmitter<number>;
@Event() slideWillChange: EventEmitter<number>;

Expand Down Expand Up @@ -174,13 +174,13 @@ export class DeckdeckgoDeck {
this.activeIndex++;

if (emitEvent) {
this.slideNextStart.emit(this.activeIndex);
this.slideNextDidChange.emit(this.activeIndex);
}
} else {
this.activeIndex--;

if (emitEvent) {
this.slidePrevStart.emit(this.activeIndex);
this.slidePrevDidChange.emit(this.activeIndex);
}
}
}
Expand Down

0 comments on commit 90df088

Please sign in to comment.