Skip to content

Commit 773546d

Browse files
committed
Resolve conflicts with master
1 parent 0ac7eb6 commit 773546d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

umap/static/umap/js/umap.importer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
L.U.Importer = L.Class.extend({
1+
U.Importer = L.Class.extend({
22
initialize: function (map) {
33
this.map = map
44
this.presets = map.options.importPresets
@@ -27,7 +27,7 @@ L.U.Importer = L.Class.extend({
2727
const noPreset = L.DomUtil.create('option', '', element)
2828
noPreset.value = noPreset.textContent = L._('Choose a preset')
2929
for (const preset of this.presets) {
30-
option = L.DomUtil.create('option', '', presetSelect)
30+
option = L.DomUtil.create('option', '', this.presetSelect)
3131
option.value = preset.url
3232
option.textContent = preset.label
3333
}
@@ -39,6 +39,7 @@ L.U.Importer = L.Class.extend({
3939
this.form = template.content.firstElementChild.cloneNode(true)
4040
this.presetSelect = this.form.querySelector('[name="preset-select"]')
4141
this.fileInput = this.form.querySelector('[name="file-input"]')
42+
this.map.ui.once('panel:closed', () => (this.fileInput.value = null))
4243
this.typeLabel = this.form.querySelector('#type-label')
4344
const helpButton = this.typeLabel.querySelector('button')
4445
this.map.help.button(this.typeLabel, 'importFormats', '', helpButton)

0 commit comments

Comments
 (0)