From 71ef5cee95f0f68ca0d6695cd4fafe56f4844778 Mon Sep 17 00:00:00 2001 From: javi Date: Thu, 10 Oct 2013 17:13:42 +0200 Subject: [PATCH] fixed point renderer precache size --- lib/torque/renderer/point.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/torque/renderer/point.js b/lib/torque/renderer/point.js index 8e67d5a..0f53ae2 100644 --- a/lib/torque/renderer/point.js +++ b/lib/torque/renderer/point.js @@ -69,10 +69,10 @@ var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); - ctx.width = canvas.width = canvasSize; - ctx.height = canvas.height = canvasSize; - ctx.translate(pointSize, pointSize); - if(st['point-file'] || st['marker-fil']) { + ctx.width = canvas.width = Math.ceil(canvasSize); + ctx.height = canvas.height = Math.ceil(canvasSize); + ctx.translate(canvasSize/2, canvasSize/2); + if(st['point-file'] || st['marker-file']) { torque.cartocss.renderSprite(ctx, st); } else { torque.cartocss.renderPoint(ctx, st);