sets the correct position of the canvas on each render
This commit is contained in:
parent
52b3521557
commit
3eef183945
@ -212,6 +212,10 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|||||||
var canvas = this.getCanvas();
|
var canvas = this.getCanvas();
|
||||||
this.renderer.clearCanvas();
|
this.renderer.clearCanvas();
|
||||||
var ctx = canvas.getContext('2d');
|
var ctx = canvas.getContext('2d');
|
||||||
|
var domPosition = L.DomUtil.getPosition(this._map.getPanes().mapPane);
|
||||||
|
if (domPosition) {
|
||||||
|
L.DomUtil.setPosition(this._canvas, { x: -domPosition.x, y: -domPosition.y });
|
||||||
|
}
|
||||||
|
|
||||||
for(t in this._tiles) {
|
for(t in this._tiles) {
|
||||||
tile = this._tiles[t];
|
tile = this._tiles[t];
|
||||||
|
Loading…
Reference in New Issue
Block a user