diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e353d1f610ee..93075222c379 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -177,3 +177,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Tamar Cohen](https://github.com/tamarmot) * [Stephen Wiseman](https://github.com/srwiseman) * [Gabriel Macario](https://github.com/gabriel-macario) +* [Mark Erikson](https://github.com/markerikson) diff --git a/Source/Scene/PolylineCollection.js b/Source/Scene/PolylineCollection.js index 7d27e2b55403..ade867e17c13 100644 --- a/Source/Scene/PolylineCollection.js +++ b/Source/Scene/PolylineCollection.js @@ -299,12 +299,12 @@ define([ PolylineCollection.prototype.remove = function(polyline) { if (this.contains(polyline)) { this._polylines[polyline._index] = undefined; // Removed later - + var polylineUpdateIndex = this._polylinesToUpdate.indexOf(polyline); if(this._polylinesToUpdate.length && polylineUpdateIndex >= 0) { this._polylinesToUpdate.splice(polylineUpdateIndex, 1); } - + this._polylinesRemoved = true; this._createVertexArray = true; this._createBatchTable = true; diff --git a/Specs/Scene/PolylineCollectionSpec.js b/Specs/Scene/PolylineCollectionSpec.js index e5e6f7647959..dfd311ab0030 100644 --- a/Specs/Scene/PolylineCollectionSpec.js +++ b/Specs/Scene/PolylineCollectionSpec.js @@ -328,7 +328,7 @@ defineSuite([ polylines.removeAll(); expect(polylines.length).toEqual(0); }); - + it('removes a polyline from the updated list when removed', function() { var firstPolyline = polylines.add(); var secondPolyline = polylines.add(); @@ -343,7 +343,6 @@ defineSuite([ expect(polylines._polylinesToUpdate.length).toEqual(1); }); - it('can check if it contains a polyline', function() { var polyline = polylines.add();