Skip to content

Commit

Permalink
Code review tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonicclay committed Feb 15, 2020
1 parent f5a4b76 commit 011c591
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/edit-modes/src/lib/measure-angle-mode.js
Expand Up @@ -24,7 +24,6 @@ export class MeasureAngleMode extends BaseGeoJsonEditMode {
const { formatTooltip, measurementCallback } = modeConfig || {};
const units = 'deg';

// const angle = turfAngle(point1, vertex, point2);
const angle1 = turfBearing(vertex, point1);
const angle2 = turfBearing(vertex, point2);
let angle = Math.abs(angle1 - angle2);
Expand All @@ -35,8 +34,7 @@ export class MeasureAngleMode extends BaseGeoJsonEditMode {
let text;
if (formatTooltip) {
text = formatTooltip(angle);
}
if (!formatTooltip) {
} else {
// By default, round to 2 decimal places and append units
text = `${parseFloat(angle).toFixed(2)} ${units}`;
}
Expand Down

0 comments on commit 011c591

Please sign in to comment.