mirror of
https://github.com/astefanutti/decktape.git
synced 2024-12-02 14:49:58 +03:00
704342eae4
A reboot of deck.js (and many extensions), using Vue.js https://github.com/twitwi/nuedeck
34 lines
688 B
JavaScript
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);
|
|
}
|
|
}
|