Fixes for review comments

Reverted icons.css to master
Removed index.html/icon-route class and modified size for SVG icon on button
Refactored RouteOpisometer.trackCell so that duplicate code is pulled outside of if blocks
This commit is contained in:
Richard Robertson 2021-03-12 12:14:16 -06:00
parent 426ee32ee5
commit f0f7ebb71f
3 changed files with 7 additions and 14 deletions

View file

@ -333,13 +333,9 @@ class RouteOpisometer extends Measurer {
} else if (cellStops.length > 1 && foundIndex != -1) {
cellStops.splice(foundIndex + 1);
this.points.splice(foundIndex + 1);
this.updateCurve();
this.updateLabel();
} else {
} else {
cellStops.push(cell);
this.points.push(this.getCellRouteCoord(cell));
this.updateCurve();
this.updateLabel();
}
} else {
if (cellStops[0] === cell) {
@ -347,15 +343,13 @@ class RouteOpisometer extends Measurer {
} else if (cellStops.length > 1 && foundIndex != -1) {
cellStops.splice(0, foundIndex);
this.points.splice(0, foundIndex);
this.updateCurve();
this.updateLabel();
} else {
} else {
cellStops.unshift(cell);
this.points.unshift(this.getCellRouteCoord(cell));
this.updateCurve();
this.updateLabel();
}
}
this.updateCurve();
this.updateLabel();
}
getCellRouteCoord(c) {