Skip to content

Commit

Permalink
Add splice logic back into remove function to fix failing Jasmine tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Vargas committed Jan 16, 2020
1 parent a56de0e commit 8c9f01e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Scene/PolylineCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ import SceneMode from './SceneMode.js';
*/
PolylineCollection.prototype.remove = function(polyline) {
if (this.contains(polyline)) {

var index = this._polylinesToUpdate.indexOf(polyline);
if (index !== -1) {
this._polylinesToUpdate.splice(index, 1);
}

this._polylinesRemoved = true;
this._createVertexArray = true;
this._createBatchTable = true;
Expand Down

0 comments on commit 8c9f01e

Please sign in to comment.