Permalink
Browse files

Refactor - use ===

  • Loading branch information...
jacobwinters committed Jun 2, 2018
1 parent 5b4451e commit 2d6b906985f6c886c624827077f2e6ea3aa428c3
Showing with 2 additions and 2 deletions.
  1. +1 −1 display.js
  2. +1 −1 fiddle.js
View
@@ -57,7 +57,7 @@ function makeDisplay(canvas) {
settings.zoom = clamp(settings.zoom, -2, 2);
});
canvas.addEventListener('mousemove', (event) => {
if(settings.operation == 'pan' && (event.buttons & 1)) {
if(settings.operation === 'pan' && (event.buttons & 1)) {
const zoomScale = 2 * 5 * Math.exp(-settings.zoom)*2;
settings.center.x -= event.movementX * zoomScale / gl.canvas.clientWidth
settings.center.y += event.movementY * zoomScale / gl.canvas.clientHeight
View
@@ -18,7 +18,7 @@ function makeGrid(node) {
for(let y = 0; y < 5; y++) {
const row = [];
for(let x = 0; x < 5; x++) {
row.push((y == 2 && x == 2) ? node : fiddle(node));
row.push((y === 2 && x === 2) ? node : fiddle(node));
}
shaders.push(row);
}

0 comments on commit 2d6b906

Please sign in to comment.