1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-09-02 09:33:25 +02:00

Fix responsive zoom for some resolutions

This commit is contained in:
Luis
2017-04-13 16:17:43 +02:00
parent b41cf41ac9
commit 5a7c84891a
4 changed files with 11 additions and 7 deletions

View File

@@ -133,7 +133,7 @@ export default class Zoom {
elem.el.style.height = `${(wsW - marginH) * 1.5}px`;
elem.el.style.minHeight = scale == 1? 'auto' : '';
// Because of flexbox, wrap height is required
wrap.style.height = `${window.innerWidth / 1.5}px`;
wrap.style.height = `${(wsW - marginH) * 1.5 / 2}px`;
} else {
elem.el.style.width = `${window.innerWidth - marginW * scale}px`;
elem.el.style.height = `${window.innerHeight - marginH * scale}px`;
@@ -178,6 +178,8 @@ export default class Zoom {
* @param {Event} ev
*/
onWindowResize(ev) {
if (this.isZoomed_) this.zoomOut();
this.zws_.slides.forEach( elem => {
const wrap = elem.el.parentElement;
const div = wrap.parentElement;