Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
externe Matthieu
Géocontrib Frontend
Commits
60e3e36d
Commit
60e3e36d
authored
1 year ago
by
metourneau
Browse files
Options
Downloads
Patches
Plain Diff
REDMINE_ISSUE-19720
| Amélioration du bouton de suppression sur la carte
parent
77d72793
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/services/edition-service.js
+2
-2
2 additions, 2 deletions
src/services/edition-service.js
with
2 additions
and
2 deletions
src/services/edition-service.js
+
2
−
2
View file @
60e3e36d
...
...
@@ -193,8 +193,6 @@ const editionService = {
* It assumes that there is only one feature present in the source.
*/
removeFeatureFromMap
()
{
// Reset all other tools to ensure only the delete feature functionality is active
this
.
resetAllTools
();
// Access the source where the features are stored
const
source
=
this
.
drawSource
;
// Replace with the correct reference to your OpenLayers source
// Get all features from the source
...
...
@@ -202,6 +200,8 @@ const editionService = {
// Check if there is a feature to delete
if
(
features
.
length
>
0
&&
confirm
(
'
Etes-vous sur de vouloir supprimer cet objet ?
'
))
{
try
{
// Reset all other tools to ensure only the delete feature functionality is active
this
.
resetAllTools
();
// Remove the feature from the source
const
featureToRemove
=
features
[
0
];
source
.
removeFeature
(
featureToRemove
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment