Default size to 16:10 ratio for Shower presentations

This commit is contained in:
Antonin Stefanutti 2017-09-25 15:21:19 +02:00
parent 8cdc8706a0
commit 20a3873032
2 changed files with 4 additions and 1 deletions

View File

@ -245,7 +245,6 @@ async function configurePage(plugin, page) {
if (!options.size) {
options.size = typeof plugin.size === 'function'
? await plugin.size()
// TODO: per-plugin default size
: { width: 1280, height: 720 };
}
await page.setViewport(options.size);

View File

@ -29,6 +29,10 @@ class Shower {
});
}
size() {
return { width: 1024, height: 640 };
}
slideCount() {
// FIXME: this does not take fragments into account which ideally should be deactivated
return this.page.evaluate(_ => decktape.shower.getSlidesCount());