From c6ba9787b5fbd9af433206c7bfd93af7aa810fb4 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Mon, 10 Mar 2014 12:37:45 +0100 Subject: [PATCH] Update the pointer to the next block when reversing Just reversing the array is not enough, the pointers to the beginning of the next block must be changed to the reversed array index. --- src/ol/render/canvas/canvasreplay.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/render/canvas/canvasreplay.js b/src/ol/render/canvas/canvasreplay.js index f54a704e20..43b046fbc7 100644 --- a/src/ol/render/canvas/canvasreplay.js +++ b/src/ol/render/canvas/canvasreplay.js @@ -449,6 +449,7 @@ ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions_ = goog.asserts.assert(begin == -1); begin = i; } else if (type == ol.render.canvas.Instruction.BEGIN_GEOMETRY) { + instruction[2] = i + 1; goog.asserts.assert(begin >= 0); ol.array.reverseSubArray(this.hitDetectionInstructions, begin, i); begin = -1;