Compare commits

..

No commits in common. "49d1dbf36ef4b2e589c566d3c3fd6c1d5c465b18" and "d4fb92ec56a410b94e9ee352cfb0b4c81b6a93db" have entirely different histories.

3 changed files with 4 additions and 8 deletions

View file

@ -950,13 +950,9 @@ export class DataLayer extends ServerStored {
else this.hide()
}
zoomTo() {
zoomTo(bounds) {
if (!this.isVisible()) return
const bounds = this.layer.getBounds()
this.zoomToBounds(bounds)
}
zoomToBounds(bounds) {
bounds = bounds || this.layer.getBounds()
if (bounds.isValid()) {
const options = { maxZoom: this.getOption('zoomTo') }
this._leafletMap.fitBounds(bounds, options)

View file

@ -382,7 +382,7 @@ export default class Importer extends Utils.WithTemplate {
bounds.extend(featureBounds)
}
this.onSuccess(features.length)
layer.zoomToBounds(bounds)
layer.zoomTo(bounds)
}
}
}

View file

@ -110,7 +110,7 @@ export class TopBar extends WithTemplate {
})
})
this.elements.help.addEventListener('click', () => this._umap.help.showGetStarted())
this.elements.help.addEventListener('click', () => this._umap.showGetStarted())
this.elements.cancel.addEventListener('click', () => this._umap.askForReset())
this.elements.cancel.addEventListener('mouseover', () => {
this._umap.tooltip.open({