From 50789565c4081ca5a15d7f24317af58e4fb147c5 Mon Sep 17 00:00:00 2001 From: javi Date: Fri, 12 Feb 2016 14:36:28 +0100 Subject: [PATCH 1/4] fixed ready event when using range rendering --- lib/torque/gmaps/torque.js | 9 ++++++++- lib/torque/leaflet/torque.js | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/torque/gmaps/torque.js b/lib/torque/gmaps/torque.js index 4f611a6..b2081e2 100644 --- a/lib/torque/gmaps/torque.js +++ b/lib/torque/gmaps/torque.js @@ -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()); diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index e6828c4..ddfd167 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -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()); From 96adfc28361c7178baf6ff69ff066dba642dceac Mon Sep 17 00:00:00 2001 From: javi Date: Mon, 15 Feb 2016 10:47:57 +0100 Subject: [PATCH 2/4] update version --- NEWS | 2 +- package.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index db29d8b..5fdefd8 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ 2.15.1 - - + - Fixed ready event then rendering more than one step 2.15.0 - Allow to render several steps at the same time (#247) diff --git a/package.json b/package.json index a151dc8..e24be56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "torque.js", - "version": "2.15.1", + "version": "2.15.2", "description": "Temporal mapping for CartoDB", "repository": { "type": "git", @@ -32,7 +32,6 @@ "browserify": "^7.0.0", "canvas": "~1.2.1", "leaflet": "0.7.3", - "mapnik": "https://github.com/CartoDB/node-mapnik/tarball/1.4.15-cdb1", "node-qunit-phantomjs": "^1.0.0", "phantomjs-polyfill": "0.0.1", "qunit": "~0.7.5", From 4d69594f2a1ce6da6e705629d35ddef8c228e366 Mon Sep 17 00:00:00 2001 From: javi Date: Mon, 15 Feb 2016 10:57:59 +0100 Subject: [PATCH 3/4] fixed version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e24be56..4db5d16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "torque.js", - "version": "2.15.2", + "version": "2.15.1", "description": "Temporal mapping for CartoDB", "repository": { "type": "git", From 4cb29464868982af737b460cc60efa9ef2a2fb68 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Wed, 17 Feb 2016 19:17:07 +0100 Subject: [PATCH 4/4] Fix dev dependencies for tests - Use fixed 1.3.0 version for node-qunit-phantomjs, which relies on phantomjs 1.x instead of 2.x - Put back node-mapnik dep for acceptance tests - Use minor versions for other dev deps --- package.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4db5d16..96be078 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,18 @@ "carto": "https://github.com/CartoDB/carto/archive/master.tar.gz" }, "devDependencies": { - "browserify": "^7.0.0", + "browserify": "~7.0.0", "canvas": "~1.2.1", "leaflet": "0.7.3", - "node-qunit-phantomjs": "^1.0.0", + "mapnik": "https://github.com/CartoDB/node-mapnik/tarball/1.4.15-cdb1", + "node-qunit-phantomjs": "1.3.0", "phantomjs-polyfill": "0.0.1", "qunit": "~0.7.5", "qunitjs": "1.x", - "request": "^2.53.0", + "request": "~2.53.0", "uglify-js": "1.3.3", - "underscore": "^1.6.0", - "sinon": "^1.15.4" + "underscore": "~1.6.0", + "sinon": "~1.15.4" }, "scripts": { "test": "make test-all"