1

Rename busy to enabled

This commit is contained in:
Alex Yatskov 2014-11-05 20:34:35 +09:00
parent 4b17ec2b4c
commit 2c1f07ac17
2 changed files with 8 additions and 8 deletions

View File

@ -41,11 +41,11 @@
maxResults: ctx.maxResults maxResults: ctx.maxResults
}; };
ctx.grapher.setBusy(true); ctx.grapher.enable(false);
$.getJSON('/search', query, function(results) { $.getJSON('/search', query, function(results) {
saveSnapshot(results); saveSnapshot(results);
outputSnapshot(results); outputSnapshot(results);
ctx.grapher.setBusy(false); ctx.grapher.enable(true);
}); });
} }

View File

@ -90,7 +90,7 @@
var _tickSize = 5; var _tickSize = 5;
var _width = 125; var _width = 125;
var _busy = false; var _enabled = true;
var _canvas = params.canvas; var _canvas = params.canvas;
var _data = params.data; var _data = params.data;
var _index = params.index; var _index = params.index;
@ -253,7 +253,7 @@
} }
function clicked(event, x, y) { function clicked(event, x, y) {
if (!_busy) { if (_enabled) {
var rect = _canvas.node.getBoundingClientRect(); var rect = _canvas.node.getBoundingClientRect();
updateValue(indicatorToValue(y - rect.top)); updateValue(indicatorToValue(y - rect.top));
} }
@ -265,8 +265,8 @@
updateShapes(); updateShapes();
}; };
this.setBusy = function(busy) { this.enable = function(enable) {
_busy = busy; _enabled = enable;
}; };
createShapes(); createShapes();
@ -355,9 +355,9 @@
} }
}; };
this.setBusy = function(busy) { this.enable = function(enable) {
for (var name in _columns) { for (var name in _columns) {
_columns[name].setBusy(busy); _columns[name].enable(enable);
} }
}; };
}; };