Merge pull request #1822 from tschaub/append-first
Always add first segment when appending coordinates.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// FIXME add option to apply snapToPixel to all coordinates?
|
||||
// FIXME can eliminate empty set styles and strokes (when all geoms skipped)
|
||||
|
||||
goog.provide('ol.render.canvas.Replay');
|
||||
goog.provide('ol.render.canvas.ReplayGroup');
|
||||
|
||||
goog.require('goog.array');
|
||||
@@ -166,6 +167,12 @@ ol.render.canvas.Replay.prototype.appendFlatCoordinates =
|
||||
lastRel = nextRel;
|
||||
}
|
||||
|
||||
// handle case where there is only one point to append
|
||||
if (i === offset + stride) {
|
||||
this.coordinates[myEnd++] = lastCoord[0];
|
||||
this.coordinates[myEnd++] = lastCoord[1];
|
||||
}
|
||||
|
||||
if (close) {
|
||||
this.coordinates[myEnd++] = flatCoordinates[offset];
|
||||
this.coordinates[myEnd++] = flatCoordinates[offset + 1];
|
||||
|
||||
Reference in New Issue
Block a user