dont rerender if not able to zoom in/out

This commit is contained in:
Zutatensuppe 2021-04-15 10:06:20 +02:00
parent 38bef17010
commit be2a651ae6

View file

@ -608,12 +608,14 @@ async function main() {
_last_mouse_down = null _last_mouse_down = null
} else if (type === Protocol.INPUT_EV_ZOOM_IN) { } else if (type === Protocol.INPUT_EV_ZOOM_IN) {
const pos = { x: evt[1], y: evt[2] } const pos = { x: evt[1], y: evt[2] }
viewport.zoomIn(viewport.worldToViewport(pos)) if (viewport.zoomIn(viewport.worldToViewport(pos))) {
RERENDER = true RERENDER = true
}
} else if (type === Protocol.INPUT_EV_ZOOM_OUT) { } else if (type === Protocol.INPUT_EV_ZOOM_OUT) {
const pos = { x: evt[1], y: evt[2] } const pos = { x: evt[1], y: evt[2] }
viewport.zoomOut(viewport.worldToViewport(pos)) if (viewport.zoomOut(viewport.worldToViewport(pos))) {
RERENDER = true RERENDER = true
}
} }
} }
} }