Skip to content

Commit

Permalink
MeasureTool - Fix line not showing when no dem data is set
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Apr 15, 2021
1 parent 9947e24 commit ad584bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/essence/Tools/Measure/MeasureTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,11 @@ function makeProfile() {
try {
data = JSON.parse(JSON.parse(data))
} catch (err) {
MeasureTool.reset()
return
// Fake a line between the most then
data = [
[elevPoints[0].y, elevPoints[0].x, 0],
[elevPoints[1].y, elevPoints[1].x, 0],
]
}

if (mode === 'segment') MeasureTool.data = F_.clone(data)
Expand Down

0 comments on commit ad584bf

Please sign in to comment.