not sure why resize was not triggering redraw

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
Victor Seiji Hariki 2022-11-30 23:50:00 -03:00
parent 4dafe50248
commit 3194f65253

View file

@ -130,7 +130,6 @@ viewport.cy = imageCollection.size.h / 2;
let worldInit = null;
imageCollection.element.style.transformOrigin = `${viewport.cx}px ${viewport.cy}px`;
viewport.transform(imageCollection.element);
mouse.listen.window.onwheel.on((evn) => {
@ -184,3 +183,7 @@ mouse.listen.window.btn.middle.onpaint.on((evn) => {
mouse.listen.window.btn.middle.onpaintend.on((evn) => {
worldInit = null;
});
window.addEventListener("resize", () => {
viewport.transform(imageCollection.element);
});