@@ 39,6 39,7 @@ if (window.matchMedia) {
}
const MIN_SCALE = 10; // can't scale lower than this
+const MAX_SCALE = 500; // can't scale higher than this
const ARROW_LEN = 0.1; // how far back arrows go
const LINE_WIDTH = 0.04;
const ARROW_ANGLE_DIV = 6; // arrow angle
@@ 352,6 353,8 @@ window.addEventListener("wheel", e => {
const delta = e.deltaY / -speed;
if ((state.scale + delta) < MIN_SCALE) {
state.scale = MIN_SCALE;
+ } else if ((state.scale + delta) > MAX_SCALE) {
+ state.scale = MAX_SCALE;
} else {
state.scale += delta;
}