From 2c1f07ac1736237788a2f96e8530a2c36ee107d4 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 5 Nov 2014 20:34:35 +0900 Subject: [PATCH] Rename busy to enabled --- client/scripts/application.js | 4 ++-- client/scripts/grapher.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/scripts/application.js b/client/scripts/application.js index e51bef3..6b0996d 100644 --- a/client/scripts/application.js +++ b/client/scripts/application.js @@ -41,11 +41,11 @@ maxResults: ctx.maxResults }; - ctx.grapher.setBusy(true); + ctx.grapher.enable(false); $.getJSON('/search', query, function(results) { saveSnapshot(results); outputSnapshot(results); - ctx.grapher.setBusy(false); + ctx.grapher.enable(true); }); } diff --git a/client/scripts/grapher.js b/client/scripts/grapher.js index 35679cb..783726c 100644 --- a/client/scripts/grapher.js +++ b/client/scripts/grapher.js @@ -90,7 +90,7 @@ var _tickSize = 5; var _width = 125; - var _busy = false; + var _enabled = true; var _canvas = params.canvas; var _data = params.data; var _index = params.index; @@ -253,7 +253,7 @@ } function clicked(event, x, y) { - if (!_busy) { + if (_enabled) { var rect = _canvas.node.getBoundingClientRect(); updateValue(indicatorToValue(y - rect.top)); } @@ -265,8 +265,8 @@ updateShapes(); }; - this.setBusy = function(busy) { - _busy = busy; + this.enable = function(enable) { + _enabled = enable; }; createShapes(); @@ -355,9 +355,9 @@ } }; - this.setBusy = function(busy) { + this.enable = function(enable) { for (var name in _columns) { - _columns[name].setBusy(busy); + _columns[name].enable(enable); } }; };