mirror of
https://github.com/astefanutti/decktape.git
synced 2024-11-30 10:34:30 +03:00
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:
parent
d16dbbe725
commit
704342eae4
33
plugins/nuedeck.js
Normal file
33
plugins/nuedeck.js
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user