Skip to content

Commit

Permalink
Merge branch 'feature/issue-125-double-elevation' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Jul 11, 2024
2 parents 2551658 + 51c6871 commit 3701538
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/segments.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ export function _getSegmentLabel(wrapped, segment, totalDistance) {
const levelName = levelNameAtElevation(CONFIG.GeometryLib.utils.pixelsToGridUnits(segment.ray.B.z));
if ( levelName ) elevLabel += `\n${levelName}`;

if ( CONFIG[MODULE_ID].debug ) {
if ( totalDistance > 30 ) { console.debug("_getSegmentLabel: 30", segment, this); }
else if ( totalDistance > 60 ) { console.debug("_getSegmentLabel: 30", segment, this); }
}

let moveLabel = "";
const units = (canvas.scene.grid.units) ? ` ${canvas.scene.grid.units}` : "";
if ( segment.waypointDistance !== segment.waypointMoveDistance ) {
Expand Down Expand Up @@ -401,7 +406,7 @@ function segmentElevationLabel(s) {
const units = canvas.scene.grid.units;
const increment = s.waypointElevationIncrement;
const multiple = Settings.get(Settings.KEYS.TOKEN_RULER.ROUND_TO_MULTIPLE) || 1;
const elevation = CONFIG.GeometryLib.utils.pixelsToGridUnits(s.ray.B.z).toNearest(multiple);
const elevation = (CONFIG.GeometryLib.utils.pixelsToGridUnits(s.ray.A.z) + s.waypointElevationIncrement).toNearest(multiple);

const segmentArrow = (increment > 0) ? "↑"
: (increment < 0) ? "↓" : "↕";
Expand Down

0 comments on commit 3701538

Please sign in to comment.