mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: remove postsync in captionBar and let map.propagate do its job (#2227)
This commit is contained in:
commit
0d5b488f93
2 changed files with 2 additions and 7 deletions
|
@ -1594,7 +1594,7 @@ U.Map = L.Map.extend({
|
||||||
'umap-caption-bar',
|
'umap-caption-bar',
|
||||||
this._controlContainer
|
this._controlContainer
|
||||||
)
|
)
|
||||||
const name = L.DomUtil.create('h3', '', container)
|
const name = L.DomUtil.create('h3', 'map-name', container)
|
||||||
L.DomEvent.disableClickPropagation(container)
|
L.DomEvent.disableClickPropagation(container)
|
||||||
this.addAuthorLink('span', container)
|
this.addAuthorLink('span', container)
|
||||||
if (this.getOption('captionMenus')) {
|
if (this.getOption('captionMenus')) {
|
||||||
|
@ -1620,11 +1620,6 @@ U.Map = L.Map.extend({
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setName = function () {
|
|
||||||
name.textContent = this.getDisplayName()
|
|
||||||
}
|
|
||||||
L.bind(setName, this)()
|
|
||||||
this.on('postsync', L.bind(setName, this))
|
|
||||||
this.onceDatalayersLoaded(function () {
|
this.onceDatalayersLoaded(function () {
|
||||||
this.slideshow.renderToolbox(container)
|
this.slideshow.renderToolbox(container)
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,7 @@ def test_can_edit_name(page, live_server, tilelayer):
|
||||||
|
|
||||||
def test_can_edit_name_on_click_on_toolbar(page, live_server, tilelayer):
|
def test_can_edit_name_on_click_on_toolbar(page, live_server, tilelayer):
|
||||||
page.goto(f"{live_server.url}/en/map/new/")
|
page.goto(f"{live_server.url}/en/map/new/")
|
||||||
page.locator(".map-name").click()
|
page.locator(".umap-main-edit-toolbox .map-name").click()
|
||||||
name_input = page.locator('.map-metadata input[name="name"]')
|
name_input = page.locator('.map-metadata input[name="name"]')
|
||||||
expect(name_input).to_be_visible()
|
expect(name_input).to_be_visible()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue