More cleanup
This commit is contained in:
parent
b7eb24bae4
commit
fa48d86c13
@ -74,11 +74,11 @@
|
|||||||
canvas: new Snap('#svg'),
|
canvas: new Snap('#svg'),
|
||||||
steps: ctx.hintSteps,
|
steps: ctx.hintSteps,
|
||||||
range: ctx.searchRange,
|
range: ctx.searchRange,
|
||||||
|
onValueChanged: onAdjust,
|
||||||
useLocalScale: true,
|
useLocalScale: true,
|
||||||
useRelativeScale: true
|
useRelativeScale: true
|
||||||
});
|
});
|
||||||
ctx.grapher.setColumns(results.columns);
|
ctx.grapher.setColumns(results.columns);
|
||||||
ctx.grapher.setValueChangedListener(onAdjust);
|
|
||||||
|
|
||||||
saveSnapshot(results);
|
saveSnapshot(results);
|
||||||
outputMatches(results.items, results.count);
|
outputMatches(results.items, results.count);
|
||||||
|
@ -291,6 +291,7 @@
|
|||||||
var _steps = params.steps || 20;
|
var _steps = params.steps || 20;
|
||||||
var _useLocalScale = params.useLocalScale || true;
|
var _useLocalScale = params.useLocalScale || true;
|
||||||
var _useRelativeScale = params.useRelativeScale || true;
|
var _useRelativeScale = params.useRelativeScale || true;
|
||||||
|
var _onValueChanged = params.onValueChanged;
|
||||||
|
|
||||||
function computeLocalScale(hints) {
|
function computeLocalScale(hints) {
|
||||||
var counts = _.pluck(hints, 'count');
|
var counts = _.pluck(hints, 'count');
|
||||||
@ -333,9 +334,10 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_columns[name] = new Column({
|
_columns[name] = new Column({
|
||||||
canvas: _canvas,
|
onValueChanged: _onValueChanged,
|
||||||
steps: _steps,
|
steps: _steps,
|
||||||
range: _range,
|
range: _range,
|
||||||
|
canvas: _canvas,
|
||||||
data: data,
|
data: data,
|
||||||
name: name,
|
name: name,
|
||||||
scale: scale,
|
scale: scale,
|
||||||
@ -358,11 +360,5 @@
|
|||||||
this.setColumns(_data);
|
this.setColumns(_data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setValueChangedListener = function(listener) {
|
|
||||||
for (var name in _columns) {
|
|
||||||
_columns[name].onValueChanged = listener;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}(window.grapher = window.grapher || {}));
|
}(window.grapher = window.grapher || {}));
|
||||||
|
Loading…
Reference in New Issue
Block a user