diff --git a/Makefile b/Makefile index f04c30b..3860844 100644 --- a/Makefile +++ b/Makefile @@ -9,20 +9,10 @@ JS_CLIENT_FILES= lib/torque/*.js \ lib/torque/leaflet/canvas_layer.js \ lib/torque/leaflet/torque.js -all: dist/torque.js dist/torque.full.js dist/torque.full.uncompressed.js: dist_folder dist/torque.uncompressed.js $(BROWSERIFY) lib/torque/index.js --standalone torque > dist/torque.full.uncompressed.js -dist/torque.full.js: dist_folder dist/torque.full.uncompressed.js - $(UGLIFYJS) dist/torque.full.uncompressed.js > dist/torque.full.js - -dist/torque.uncompressed.js: dist_folder $(JS_CLIENT_FILES) - $(BROWSERIFY) lib/torque/index.js --no-bundle-external --standalone torque > dist/torque.uncompressed.js - -dist/torque.js: dist_folder dist/torque.uncompressed.js - $(UGLIFYJS) dist/torque.uncompressed.js > dist/torque.js - dist_folder: mkdir -p dist diff --git a/NEWS b/NEWS index 1c36621..9a25312 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 2.11.3 - Limited sprite radius to a maximum of 255px - Fixed custom marker-file functionality in Firefox + - Fixed inertia mismatch of Torque's canvas layer 2.11.2 - Added error handling to Torque - Fixed 'remove' event triggering when removing a Torque layer. diff --git a/lib/torque/leaflet/canvas_layer.js b/lib/torque/leaflet/canvas_layer.js index 642ef77..32b15f6 100644 --- a/lib/torque/leaflet/canvas_layer.js +++ b/lib/torque/leaflet/canvas_layer.js @@ -85,7 +85,7 @@ L.CanvasLayer = L.Class.extend({ }, this); map.on({ 'viewreset': this._reset }, this); - map.on('move', this.render, this); + map.on('move', this.redraw, this); map.on('resize', this._reset, this); if (this.options.zoomAnimation) { @@ -232,6 +232,10 @@ L.CanvasLayer = L.Class.extend({ // use direct: true if you are inside an animation frame call redraw: function(direct) { + var domPosition = L.DomUtil.getPosition(this._map.getPanes().mapPane); + if (domPosition) { + L.DomUtil.setPosition(this._canvas, { x: -domPosition.x, y: -domPosition.y }); + } if (direct) { this.render(); } else {