From 622a25c1e44c6698079897c3cd11fab89c75efe8 Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Wed, 21 Jul 2021 16:24:10 -0700 Subject: [PATCH 1/3] Update changelog --- Changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog.md b/Changelog.md index befed3e..3567c9b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +# 0.2.5 +For conceptual consistency, switch to projecting the origin point for the token so that the projected path goes from the token at a given height to the destination point. May not result in a different outcome in most cases, but may be different for edge cases when measuring diagonals. + # 0.2.4 Minor update with additional checks on presence of elevation increment flag. Additional logging. From ba195bdb2660dac0df396b12c8b5c26913cff6ae Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Wed, 21 Jul 2021 16:24:48 -0700 Subject: [PATCH 2/3] Fix jumping token due to needing to await. Need to await the wrapped token movement before updating. --- scripts/ruler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ruler.js b/scripts/ruler.js index 078e4db..18d53f7 100644 --- a/scripts/ruler.js +++ b/scripts/ruler.js @@ -266,7 +266,7 @@ export async function elevationRulerAnimateToken(wrapped, token, ray, dx, dy, se log(`Current token elevation is ${current_elevation}. Will be changed to ${end_elevation}.`); // move the token first. - let res = wrapped(token, ray, dx, dy, segment_num); + let res = await wrapped(token, ray, dx, dy, segment_num); if(current_elevation !== end_elevation) { await token.document.update({ 'elevation': end_elevation }); From e4a13b820af4262c7ef589345b47fc951d5c7e5f Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Wed, 21 Jul 2021 16:28:10 -0700 Subject: [PATCH 3/3] Update changelog. --- Changelog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 3567c9b..93d9b72 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # 0.2.5 -For conceptual consistency, switch to projecting the origin point for the token so that the projected path goes from the token at a given height to the destination point. May not result in a different outcome in most cases, but may be different for edge cases when measuring diagonals. +Correct "jumping token" issue where when the token is moved, it will appear to drift off the path and move twice. + +For conceptual consistency, switch to projecting the origin point for the token so that the projected path goes from the token at a given height to the destination point. This was the intended approach, but the origin/destination got flipped in the projection code. May not result in a different outcome in most cases, but may be different for edge cases when measuring diagonals. # 0.2.4 Minor update with additional checks on presence of elevation increment flag. Additional logging.