Fix hovering an infobox on entries list not working

This commit is contained in:
Hans5958 2023-04-06 23:35:30 +07:00
parent 19c2b5ca03
commit cf7e397ab2

View file

@ -400,8 +400,7 @@ function buildObjectsList(filter = null, sort = null) {
}
const element = createInfoBlock(sortedAtlas[i])
element.entry = sortedAtlas[i]
const entry = sortedAtlas[i]
element.addEventListener("mouseenter", function () {
if (!fixed && !dragging) {
@ -411,9 +410,9 @@ function buildObjectsList(filter = null, sort = null) {
previousScaleZoomOrigin = [scaleZoomOrigin[0], scaleZoomOrigin[1]]
applyView()
setView(this.entry.center[0], this.entry.center[1], setZoomByPath(entry.path))
setView(entry.center[0], entry.center[1], setZoomByPath(entry.path))
hovered = [this.entry]
hovered = [entry]
render()
hovered[0].element = this
updateLines()