Merge pull request #1092 from umap-project/713-better-anonymous-editing

Do not display an alert if the map is not created
This commit is contained in:
Yohan Boniface 2023-05-20 08:56:52 +02:00 committed by GitHub
commit 32873b7fe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -704,7 +704,14 @@ L.U.Map.include({
this.options.zoom = this.getZoom()
this.isDirty = true
this._default_extent = false
this.ui.alert({ content: L._('The zoom and center have been set.'), level: 'info' })
if (this.options.umap_id) {
// We do not want an extra message during the map creation
// to avoid the double notification/alert.
this.ui.alert({
content: L._('The zoom and center have been set.'),
level: 'info',
})
}
},
updateTileLayers: function () {