Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Multiple Measurements #1194

Merged
merged 2 commits into from
May 8, 2024
Merged

Allow Multiple Measurements #1194

merged 2 commits into from
May 8, 2024

Conversation

dhochbaum-dcp
Copy link
Contributor

@dhochbaum-dcp dhochbaum-dcp commented Apr 3, 2024

Currently, clicking the distance or area button clears any previously drawn distance/area. With this PR, you are now able to draw multiple lines or shapes, and able to see the sum of the drawn distances/areas. The X button continues to clear all drawn shapes and stored measurements.

image

Completes #1195

Copy link

netlify bot commented Apr 3, 2024

Deploy Preview for labs-zola failed.

Name Link
🔨 Latest commit 9128ce7
🔍 Latest deploy log https://app.netlify.com/sites/labs-zola/deploys/663baeb80bb1950008900574

@dhochbaum-dcp dhochbaum-dcp changed the title Drawing now retains previously drawn lines/areas Allow Multiple Measurements Apr 3, 2024
@dhochbaum-dcp dhochbaum-dcp marked this pull request as ready for review April 16, 2024 18:24
@dhochbaum-dcp dhochbaum-dcp requested a review from a team as a code owner April 16, 2024 18:24
Copy link
Contributor

@TylerMatteo TylerMatteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just clean up the commented code. Otherwise lgtm

@@ -56,11 +138,12 @@ export default class MapMeasurementToolsComponent extends Component {
const drawMode = type === 'line' ? 'draw_line_string' : 'draw_polygon';
const { mainMap } = this;
if (mainMap.get('drawMode')) {
draw.deleteAll();
// the following have been commented out, as we no longer want to clear all previous drawings unless the user hits the x button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to commit commented out code. If we don't need it, delete it. If we have to bring it back, that's what git is for.

@dhochbaum-dcp dhochbaum-dcp merged commit 5ab733e into develop May 8, 2024
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants