ready callback

This commit is contained in:
javi 2013-09-30 13:31:06 +02:00
parent 9a0ac46ef3
commit 5d08c83bb0

View File

@ -31,7 +31,7 @@
if(options.start === undefined) {
this._fetchKeySpan();
} else {
this._ready = true;
this._setReady(true);
}
};
@ -152,6 +152,7 @@
_setReady: function(ready) {
this._ready = true;
this._processQueue();
this.options.ready && this.options.ready();
},
_processQueue: function() {
@ -219,6 +220,10 @@
};
},
getBounds: function() {
return this.options.bounds;
},
//
// the data range could be set by the user though ``start``
// option. It can be fecthed from the table when the start
@ -251,6 +256,10 @@
self.options.start = data.min;
self.options.end = data.max;
self.options.step = (data.max - data.min)/self.options.steps;
self.options.bounds = [
[data.ymin, data.xmin],
[data.ymax, data.xmax]
];
self._setReady(true);
}, { parseJSON: true });
}