From d644acd50b4c911f859633a2b8537ec6b5da06c2 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Tue, 18 Jun 2013 17:55:58 -0400 Subject: [PATCH] Fix lack of braces on if statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JavaScript's most popular rack in the grass for maintenance coders… --- src/viewer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 10b0735a..8b16b9dc 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -276,19 +276,21 @@ $.Viewer = function( options ) { case 119://w case 87://W case 38://up arrow - if (shiftKey) + if (shiftKey) { _this.viewport.zoomBy(1.1); - else + } else { _this.viewport.panBy(new $.Point(0, -0.05)); + } _this.viewport.applyConstraints(); return false; case 115://s case 83://S case 40://down arrow - if (shiftKey) + if (shiftKey) { _this.viewport.zoomBy(0.9); - else + } else { _this.viewport.panBy(new $.Point(0, 0.05)); + } _this.viewport.applyConstraints(); return false; case 97://a