decktape/plugins/nuedeck.js
Rémi Emonet 704342eae4 Add support for NueDeck
A reboot of deck.js (and many extensions), using Vue.js
https://github.com/twitwi/nuedeck
2019-07-03 17:05:18 +02:00

34 lines
688 B
JavaScript

exports.create = page => new NueDeck(page);
class NueDeck {
constructor(page) {
this.page = page;
}
getName() {
return 'NueDeck';
}
size() {
return this.page.evaluate(_ => ({ width: nuedeck.opts.core.designWidth,
height: nuedeck.opts.core.designHeight }));
}
isActive() {
return this.page.evaluate(_ => typeof nuedeck !== 'undefined');
}
slideCount() {
return this.page.evaluate(_ => nuedeck.slideCount);
}
nextSlide() {
return this.page.evaluate(_ => nuedeck.jumpToSlide(nuedeck.currentSlide + 1, -1));
}
currentSlideIndex() {
return this.page.evaluate(_ => nuedeck.currentSlide);
}
}