Merge branch 'master' of github.com:CartoDB/torque into comp-ops

This commit is contained in:
Francisco Dans 2016-02-17 20:00:39 +01:00
commit 9f759caaed
4 changed files with 22 additions and 8 deletions

2
NEWS
View File

@ -1,5 +1,5 @@
2.15.1 2.15.1
- - Fixed ready event then rendering more than one step
2.15.0 2.15.0
- Allow to render several steps at the same time (#247) - Allow to render several steps at the same time (#247)

View File

@ -107,7 +107,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
self.fire('change:steps', { self.fire('change:steps', {
steps: self.provider.getSteps() steps: self.provider.getSteps()
}); });
self.setKey(self.getKey()); self.setKeys(self.getKeys());
}; };
this.provider = new this.providers[this.options.provider](this.options); this.provider = new this.providers[this.options.provider](this.options);
@ -241,6 +241,13 @@ GMapsTorqueLayer.prototype = torque.extend({},
this.setKeys([key]); this.setKeys([key]);
}, },
/**
* returns the array of keys being rendered
*/
getKeys: function() {
return this.keys;
},
setKeys: function(keys) { setKeys: function(keys) {
this.keys = keys; this.keys = keys;
this.animator.step(this.getKey()); this.animator.step(this.getKey());

View File

@ -89,7 +89,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
self.fire('change:steps', { self.fire('change:steps', {
steps: self.provider.getSteps() steps: self.provider.getSteps()
}); });
self.setKey(self.getKey()); self.setKeys(self.getKeys());
}; };
this.renderer.on("allIconsLoaded", this.render.bind(this)); this.renderer.on("allIconsLoaded", this.render.bind(this));
@ -286,6 +286,13 @@ L.TorqueLayer = L.CanvasLayer.extend({
this.setKeys([key], options); this.setKeys([key], options);
}, },
/**
* returns the array of keys being rendered
*/
getKeys: function() {
return this.keys;
},
setKeys: function(keys, options) { setKeys: function(keys, options) {
this.keys = keys; this.keys = keys;
this.animator.step(this.getKey()); this.animator.step(this.getKey());

View File

@ -29,18 +29,18 @@
"carto": "https://github.com/CartoDB/carto/archive/master.tar.gz" "carto": "https://github.com/CartoDB/carto/archive/master.tar.gz"
}, },
"devDependencies": { "devDependencies": {
"browserify": "^7.0.0", "browserify": "~7.0.0",
"canvas": "~1.2.1", "canvas": "~1.2.1",
"leaflet": "0.7.3", "leaflet": "0.7.3",
"mapnik": "https://github.com/CartoDB/node-mapnik/tarball/1.4.15-cdb1", "mapnik": "https://github.com/CartoDB/node-mapnik/tarball/1.4.15-cdb1",
"node-qunit-phantomjs": "^1.0.0", "node-qunit-phantomjs": "1.3.0",
"phantomjs-polyfill": "0.0.1", "phantomjs-polyfill": "0.0.1",
"qunit": "~0.7.5", "qunit": "~0.7.5",
"qunitjs": "1.x", "qunitjs": "1.x",
"request": "^2.53.0", "request": "~2.53.0",
"uglify-js": "1.3.3", "uglify-js": "1.3.3",
"underscore": "^1.6.0", "underscore": "~1.6.0",
"sinon": "^1.15.4" "sinon": "~1.15.4"
}, },
"scripts": { "scripts": {
"test": "make test-all" "test": "make test-all"