Do not optimize lines away entirely

This commit is contained in:
Andreas Hocevar
2016-06-23 09:33:04 +02:00
parent 3726b25ba2
commit 35129af7f0
3 changed files with 10 additions and 1 deletions

View File

@@ -489,7 +489,7 @@ ol.render.canvas.Replay.prototype.replay_ = function(
y = pixelCoordinates[d + 1];
roundX = (x + 0.5) | 0;
roundY = (y + 0.5) | 0;
if (roundX !== prevX || roundY !== prevY) {
if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {
context.lineTo(x, y);
prevX = roundX;
prevY = roundY;