Skip to content

Commit

Permalink
Merge pull request #1805 from umap-project/fix-continue-line
Browse files Browse the repository at this point in the history
fix: do not try to render drawinTooltip on drawing start
  • Loading branch information
yohanboniface authored May 9, 2024
2 parents 369f798 + f064619 commit 4ebbf8e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions umap/static/umap/js/umap.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ U.ToggleEditAction = U.BaseFeatureAction.extend({
onClick: function (e) {
if (this.feature._toggleEditing) {
this.feature._toggleEditing(e) // Path
} else {
} else {
this.feature.edit(e) // Marker
}
},
Expand Down Expand Up @@ -1319,10 +1319,7 @@ U.ContextMenu = L.Map.ContextMenu.extend({
U.Editable = L.Editable.extend({
initialize: function (map, options) {
L.Editable.prototype.initialize.call(this, map, options)
this.on(
'editable:drawing:start editable:drawing:click editable:drawing:move',
this.drawingTooltip
)
this.on('editable:drawing:click editable:drawing:move', this.drawingTooltip)
this.on('editable:drawing:end', (e) => {
this.closeTooltip()
// Leaflet.Editable will delete the drawn shape if invalid
Expand Down

0 comments on commit 4ebbf8e

Please sign in to comment.