mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 04:21:24 +01:00
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:
parent
426ee32ee5
commit
f0f7ebb71f
3 changed files with 7 additions and 14 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue