Skip to content

Commit

Permalink
Merge pull request #1447 from simon-leech/help-dialog-geometry-entry
Browse files Browse the repository at this point in the history
Missing HelpDialog for Editing a Geometry Editing
  • Loading branch information
RobAndrewHurst authored Sep 2, 2024
2 parents 171b2d7 + 1d622c8 commit 453aba4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/ui/locations/entries/geometry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ mapp.utils.merge(mapp.dictionaries, {
en: {
delete_geometry: 'Delete Geometry',
modify_geometry: 'Modify Geometry',
edit_dialog_title: 'Editing Instructions',
edit_dialog_cancel_drawing: 'Cancel Drawing - Click on the cancel button to cancel the drawing.',
edit_dialog_remove_vertex: 'Remove Vertex - Click on a vertex to remove it.',
edit_dialog_modify_shape: 'Edit Shape- Drag a vertex to modify the shape, or add a new vertex on the polygon.',
edit_dialog_save: 'Save - Click on the save button to save your changes.',
},
de: {
delete_geometry: 'Geometrie entfernen',
Expand Down Expand Up @@ -259,6 +264,19 @@ function modify(e) {
// the modify event maybe triggered by an API.
const btn = e.target

const helpDialog = {
header: mapp.utils.html`<h3>${mapp.dictionary.edit_dialog_title}</h3>`,
content: mapp.utils.html.node`<li>
<ul>${mapp.dictionary.edit_dialog_cancel_drawing}
<ul>${mapp.dictionary.edit_dialog_remove_vertex}</ul>
<ul>${mapp.dictionary.edit_dialog_modify_shape}</ul>
<ul>${mapp.dictionary.edit_dialog_save}</ul>`
}

// Call the helpDialog
mapp.ui.elements.helpDialog(helpDialog);


// Check whether to cancel interaction.
if (btn.classList.contains('active')) {

Expand Down

0 comments on commit 453aba4

Please sign in to comment.