not sure why resize was not triggering redraw
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
4dafe50248
commit
3194f65253
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue