Skip to content

Commit

Permalink
fix(yasgui): fix duplicated map shown in some specific cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicm67 committed Oct 23, 2024
1 parent bb3834b commit d7f35c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-birds-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trifid-plugin-yasgui": patch
---

Fix duplicate map shown in some specific cases.
3 changes: 3 additions & 0 deletions packages/yasgui/plugins/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class YasguiMap {
mapLayer.appendChild(wkt)
mapLayer.appendChild(select)
el.appendChild(mapLayer)

// Clear the results element and append the map
this.yasr.resultsEl.textContent = ''

Check warning on line 137 in packages/yasgui/plugins/map.js

View check run for this annotation

Codecov / codecov/patch

packages/yasgui/plugins/map.js#L135-L137

Added lines #L135 - L137 were not covered by tests
this.yasr.resultsEl.appendChild(el)

const editStyle = new Style({
Expand Down

0 comments on commit d7f35c0

Please sign in to comment.