Skip to content

Commit ed7e69b

Browse files
Merge pull request #763 from appdevforall/fix/K2GO-566-maps-fqr-second-rectangle
K2GO-566 fix(maps): carry a fix for the second FQR rectangle
2 parents 2ea75de + e107660 commit ed7e69b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Upstream-PR: https://github.com/iiab/iiab/pull/4577
2+
Upstream-Status: open
3+
Applies-to: roles/maps/templates/index.html.j2
4+
Summary: Fix the TypeError when you draw a second region-download rectangle. removeOtherRectangles is a plain inner function, so `this` is undefined there; use thisControl. Without the fix, rectangle B is not drawn and the tool stops until Cancel (K2GO-566). Drop this patch when iiab#4577 is in the pinned iiab/iiab commit.
5+
6+
diff --git a/roles/maps/templates/index.html.j2 b/roles/maps/templates/index.html.j2
7+
index 6973d6e4e..d92f0b8e3 100644
8+
--- a/roles/maps/templates/index.html.j2
9+
+++ b/roles/maps/templates/index.html.j2
10+
@@ -1754,7 +1754,7 @@
11+
function removeOtherRectangles(id) {
12+
for (let feature of thisControl._drawControl.getFeatures().features) {
13+
if (feature.id !== id) {
14+
- this._terraDrawInstance.removeFeatures([feature.id])
15+
+ thisControl._terraDrawInstance.removeFeatures([feature.id])
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)