editor zoom: adjust root widget size when zooming out

This commit is contained in:
jean-emmanuel 2022-10-30 18:55:51 +01:00
parent ed63e2c063
commit 99db67dd5d
4 changed files with 20 additions and 11 deletions

View file

@ -51,6 +51,8 @@ class Zoom extends EventEmitter {
requestAnimationFrame(()=>{
this.localZoom = zoom
document.documentElement.style.setProperty('--local-zoom', this.localZoom)
document.body.classList.toggle('local-zoom-in', this.localZoom > 1)
document.body.classList.toggle('local-zoom-out', this.localZoom < 1)
this.trigger('local-zoom-changed')
})
}