dont rerender if not able to zoom in/out
This commit is contained in:
parent
38bef17010
commit
be2a651ae6
1 changed files with 6 additions and 4 deletions
|
|
@ -608,15 +608,17 @@ async function main() {
|
|||
_last_mouse_down = null
|
||||
} else if (type === Protocol.INPUT_EV_ZOOM_IN) {
|
||||
const pos = { x: evt[1], y: evt[2] }
|
||||
viewport.zoomIn(viewport.worldToViewport(pos))
|
||||
if (viewport.zoomIn(viewport.worldToViewport(pos))) {
|
||||
RERENDER = true
|
||||
}
|
||||
} else if (type === Protocol.INPUT_EV_ZOOM_OUT) {
|
||||
const pos = { x: evt[1], y: evt[2] }
|
||||
viewport.zoomOut(viewport.worldToViewport(pos))
|
||||
if (viewport.zoomOut(viewport.worldToViewport(pos))) {
|
||||
RERENDER = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
finished = Game.getFinishTs(gameId)
|
||||
if (justFinished()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue