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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: deckgo/deckdeckgo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0-beta.7
Choose a base ref
...
head repository: deckgo/deckdeckgo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.0-beta.8
Choose a head ref
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Nov 28, 2018

  1. Copy the full SHA
    dd37c90 View commit details
  2. Copy the full SHA
    f5533ad View commit details
Showing with 28 additions and 5 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −0 doc/features/extra.md
  3. +10 −1 doc/features/navigation.md
  4. +1 −1 package-lock.json
  5. +1 −1 package.json
  6. +2 −1 src/components.d.ts
  7. +6 −1 src/components/deck/deckdeckgo-deck/deckdeckgo-deck.tsx
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.0.0-beta.8"></a>
# [1.0.0-beta.8](https://github.com/fluster/deckdeckgo/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2018-11-28)

### Features

* add a new event slideToChange ([#dd37c90](https://github.com/fluster/deckdeckgo/commit/dd37c9021f2b433eb7ada5dc715c0f11910f5bcc))

<a name="1.0.0-beta.7"></a>
# [1.0.0-beta.7](https://github.com/fluster/deckdeckgo/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2018-11-28)

1 change: 1 addition & 0 deletions doc/features/extra.md
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ await deck.print();
| -------------------------- |:-----------------:|:-----------------:|
| 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. |
| slideToChange | number | Emitted when a specific slide as selected. Emit the index of the new selected 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. |

11 changes: 10 additions & 1 deletion doc/features/navigation.md
Original file line number Diff line number Diff line change
@@ -8,8 +8,9 @@ Furthermore than the default swiping, the [DeckDeckGo] deck expose the following
- [Go to next slide](#go-to-next-slide)
- [Optional parameters](#pptional-parameters)
- [Go to previous slide](#go-to-previous-slide)
- [Optional parameters](#pptional-parameters)
- [Optional parameters](#optional-parameters)
- [Go to a specific slide](#go-to-a-specific-slide)
- [Parameters](#parameters)
- [Is the deck at the begin](#is-the-deck-at-the-begin)
- [Is the deck at the end](#is-the-deck-at-the-end)
- [Get the index of the current slide](#get-the-index-of-the-current-slide)
@@ -72,6 +73,14 @@ await deck.slidePrev(false, false);
await deck.slideTo(0); // parameters: index: number, speed?: number | undefined
```

#### Parameters

| Parameter | Type | Default | Description |
| -------------------------- |:-----------------:|:-----------------:|:-----------------:|
| index | number | | Slide index of the specific slide. |
| speed | number | 0 | The slide transition speed. |
| emitEvent | boolean | true | In case you would not like to emit the event `slideToChange`. Note that if you would use this parameter, the above `speed` parameter must be provided too. |

### Is the deck at the begin

```
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deckdeckgo",
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"description": "Add a lightweight presentation to your web project using HTML and Web Components",
"module": "dist/esm/index.js",
"main": "dist/index.js",
3 changes: 2 additions & 1 deletion src/components.d.ts
Original file line number Diff line number Diff line change
@@ -23,14 +23,15 @@ export namespace Components {
'pagerPercentage': boolean;
'slideNext': (slideAnimation?: boolean, emitEvent?: boolean) => Promise<void>;
'slidePrev': (slideAnimation?: boolean, emitEvent?: boolean) => Promise<void>;
'slideTo': (index: number, speed?: number) => Promise<void>;
'slideTo': (index: number, speed?: number, emitEvent?: boolean) => Promise<void>;
'toggleFullScreen': () => Promise<void>;
}
interface DeckgoDeckAttributes extends StencilHTMLAttributes {
'keyboard'?: boolean;
'onSlideDrag'?: (event: CustomEvent<number>) => void;
'onSlideNextDidChange'?: (event: CustomEvent<number>) => void;
'onSlidePrevDidChange'?: (event: CustomEvent<number>) => void;
'onSlideToChange'?: (event: CustomEvent<number>) => void;
'onSlideWillChange'?: (event: CustomEvent<number>) => void;
'pager'?: boolean;
'pagerPercentage'?: boolean;
7 changes: 6 additions & 1 deletion src/components/deck/deckdeckgo-deck/deckdeckgo-deck.tsx
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ export class DeckdeckgoDeck {

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

@@ -344,7 +345,7 @@ export class DeckdeckgoDeck {
}

@Method()
async slideTo(index: number, speed?: number | undefined) {
async slideTo(index: number, speed?: number | undefined, emitEvent: boolean = true) {
if (index > this.length || index < 0) {
return;
}
@@ -360,6 +361,10 @@ export class DeckdeckgoDeck {

await this.lazyLoadImages(this.activeIndex);
await this.doSwipeSlide(slider, speed);

if (emitEvent) {
this.slideToChange.emit(index);
}
}

/* END: Manual sliding */