-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
developmentgeneral development issuegeneral development issue
Description
Current situation
IITC-CE uses the Leaflet.draw library, which has not been updated for 7 years. PR #813 proposes adding a confirmation when deleting all layers using the following code:
// Add Confirm request to Delete-All command
var original = L.EditToolbar.Delete.prototype.removeAllLayers;
L.EditToolbar.Delete.prototype.removeAllLayers = function () {
if (confirm('Are you sure?')) {
original.call(this);
}
};Problem
This approach involves direct modification of library methods in the IITC-CE code, which is not an optimal solution in terms of long-term code maintenance and may cause problems when updating the library.
Proposed solution
It is necessary to:
- Research existing forks of the
Leaflet.drawlibrary and choose an actively maintained option - Or create our own fork of the library if no suitable one is found
- Transfer the changes proposed in PR drawtools: add delete confirmation dialog #813 to the selected/created fork
- Update dependencies in IITC-CE to use the new library instead of the outdated one
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
developmentgeneral development issuegeneral development issue