Namespacing grapher and utilities
This commit is contained in:
parent
bf0faad5ed
commit
797005c9a5
@ -49,7 +49,7 @@
|
||||
ctx.hintSteps = query.hintSteps;
|
||||
ctx.maxResults = query.maxResults;
|
||||
|
||||
ctx.grapher = new Grapher('grapher', ctx.searchRange, 150, true, true);
|
||||
ctx.grapher = new grapher.Grapher('grapher', ctx.searchRange, 150, true, true);
|
||||
ctx.grapher.setColumns(results.columns);
|
||||
ctx.grapher.setValueChangedListener(onAdjust);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
(function(grapher) {
|
||||
//
|
||||
// Coord
|
||||
//
|
||||
@ -460,7 +461,7 @@ function Column(canvas, name, params, scale, range, bounds) {
|
||||
// Grapher
|
||||
//
|
||||
|
||||
function Grapher(canvas, range, columnWidth, useLocalScale, useRelativeScale) {
|
||||
grapher.Grapher = function(canvas, range, columnWidth, useLocalScale, useRelativeScale) {
|
||||
this.setColumns = function(columns) {
|
||||
this.clearColumns();
|
||||
|
||||
@ -661,3 +662,4 @@ function Grapher(canvas, range, columnWidth, useLocalScale, useRelativeScale) {
|
||||
c.addEventListener('dblclick', this.mouseDoubleClick, false);
|
||||
c.grapher = this;
|
||||
}
|
||||
}(window.grapher = window.grapher || {}));
|
||||
|
Loading…
Reference in New Issue
Block a user