Hook up grapher to the rest of application
This commit is contained in:
parent
26bec7c341
commit
71e9a616cf
@ -158,7 +158,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function outputSnapshot(results) {
|
function outputSnapshot(results) {
|
||||||
ctx.grapher.updateColumns(results.columns);
|
ctx.grapher.setColumns(results.columns);
|
||||||
outputMatches(results.items, results.count);
|
outputMatches(results.items, results.count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,14 +135,15 @@
|
|||||||
var _height = 500;
|
var _height = 500;
|
||||||
var _padding = 10;
|
var _padding = 10;
|
||||||
|
|
||||||
var _canvas = params.canvas;
|
var _onValueChanged = params.onValueChanged;
|
||||||
var _name = params.name;
|
var _canvas = params.canvas;
|
||||||
var _data = params.data;
|
var _name = params.name;
|
||||||
var _scale = params.scale;
|
var _data = params.data;
|
||||||
var _range = params.range;
|
var _scale = params.scale;
|
||||||
var _steps = params.steps;
|
var _range = params.range;
|
||||||
var _index = params.index;
|
var _steps = params.steps;
|
||||||
var _elements = {};
|
var _index = params.index;
|
||||||
|
var _elements = {};
|
||||||
|
|
||||||
function createShapes() {
|
function createShapes() {
|
||||||
_elements.gradient = _canvas.gradient(decimateHints());
|
_elements.gradient = _canvas.gradient(decimateHints());
|
||||||
@ -253,11 +254,11 @@
|
|||||||
return hintGroups;
|
return hintGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setClampedValue(value, final) {
|
function setClampedValue(value) {
|
||||||
_data.value = _range.clamp(value);
|
_data.value = _range.clamp(value);
|
||||||
|
|
||||||
if (final && onValueChanged) {
|
if (_onValueChanged) {
|
||||||
onValueChanged(_name, _data.value);
|
_onValueChanged(_name, _data.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateShapes();
|
updateShapes();
|
||||||
|
Loading…
Reference in New Issue
Block a user