properly invalidates ballrenderer with each tile

This commit is contained in:
Francisco Dans 2015-02-24 12:06:47 +01:00
parent cd396b19c3
commit d7d7396ba8

View File

@ -210,7 +210,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');
if(typeof this.renderer.ballRenderer !== "undefined"){
this.renderer._ctx.setTransform(1, 0, 0, 1, 0, 0);
this.renderer.ballRenderer.invalidate();
}
for(t in this._tiles) { for(t in this._tiles) {
tile = this._tiles[t]; tile = this._tiles[t];
if (tile) { if (tile) {