Add support for NueDeck

A reboot of deck.js (and many extensions), using Vue.js
https://github.com/twitwi/nuedeck
This commit is contained in:
Rémi Emonet 2019-07-03 15:27:26 +02:00 committed by Antonin Stefanutti
parent d16dbbe725
commit 704342eae4

33
plugins/nuedeck.js Normal file
View File

@ -0,0 +1,33 @@
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);
}
}