Merge pull request #255 from CartoDB/key_fix
fixed ready event when using range rendering
This commit is contained in:
commit
99e8a242e4
@ -107,7 +107,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
self.fire('change:steps', {
|
||||
steps: self.provider.getSteps()
|
||||
});
|
||||
self.setKey(self.getKey());
|
||||
self.setKeys(self.getKeys());
|
||||
};
|
||||
|
||||
this.provider = new this.providers[this.options.provider](this.options);
|
||||
@ -241,6 +241,13 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
this.setKeys([key]);
|
||||
},
|
||||
|
||||
/**
|
||||
* returns the array of keys being rendered
|
||||
*/
|
||||
getKeys: function() {
|
||||
return this.keys;
|
||||
},
|
||||
|
||||
setKeys: function(keys) {
|
||||
this.keys = keys;
|
||||
this.animator.step(this.getKey());
|
||||
|
@ -89,7 +89,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
self.fire('change:steps', {
|
||||
steps: self.provider.getSteps()
|
||||
});
|
||||
self.setKey(self.getKey());
|
||||
self.setKeys(self.getKeys());
|
||||
};
|
||||
|
||||
this.renderer.on("allIconsLoaded", this.render.bind(this));
|
||||
@ -286,6 +286,13 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
this.setKeys([key], options);
|
||||
},
|
||||
|
||||
/**
|
||||
* returns the array of keys being rendered
|
||||
*/
|
||||
getKeys: function() {
|
||||
return this.keys;
|
||||
},
|
||||
|
||||
setKeys: function(keys, options) {
|
||||
this.keys = keys;
|
||||
this.animator.step(this.getKey());
|
||||
|
Loading…
Reference in New Issue
Block a user