Do not close the ring when we use closePath()

This commit is contained in:
Andreas Hocevar
2016-08-11 13:17:42 +02:00
parent a4f69f32d7
commit 370c0c0846

View File

@@ -1210,8 +1210,10 @@ ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCo
for (i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var myBegin = this.coordinates.length;
var myEnd = this.appendFlatCoordinates(
flatCoordinates, offset, end, stride, true);
var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride,
// Performance optimization: only close the ring when we do not have a
// stroke. Otherwise closePath() will take care of that.
!stroke);
var moveToLineToInstruction =
[ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
this.instructions.push(moveToLineToInstruction);