diff --git a/CHANGELOG.md b/CHANGELOG.md index 3774bf5af16747439b0bb6d6d3876578f1ca121b..bbcb64633b9f6b21f03f560664099ed577050515 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### Changed - fileImport: If the features of the imported file are removed from MP, the imported file name will be removed from the "Successfully imported" list - package.json test:vue: excluded /cosi/node_modules from test paths (now matching masterportal root packages that are not tested) -- layerSelector: update function calls and bootstrap usage +- layerSelector: update function calls and bootstrap usage ### Deprecated ### Removed @@ -23,10 +23,11 @@ - Fix some vulnerabilities in dependencies - Issue #821: Sorting the table in featureLister tool now works again - Issue #845: The buffer analysis tool now shows results correctly again -- DPS-1355: Fix the position of the unfreeze button which should be over the menu on the touch table view -- DPS-1355: After a layer is selected from the search results it is now getting added to the layer tree again +- Fix the position of the unfreeze button which should be over the menu on the touch table view +- After a layer is selected from the search results it is now getting added to the layer tree again - Issue #851: Filter - When the multiLayerSelector attribute is set to false, it no longer prevents the accordions from opening. - Issue #853: The quickHelp tool is now configurable for the layer tree +- Do not show alert message to use 2 Fingers on GFI Window or any other div apart from map if twoFingerPan is configured to true --- ## Unreleased - in development diff --git a/src/core/maps/store/actions/actionsMapAttributesMapper.js b/src/core/maps/store/actions/actionsMapAttributesMapper.js index 67c57ebe6dcbc5f9273a80a25ea4b25ca03be1a1..19fefcd297a4da828559551e70851ff87959b993 100644 --- a/src/core/maps/store/actions/actionsMapAttributesMapper.js +++ b/src/core/maps/store/actions/actionsMapAttributesMapper.js @@ -20,8 +20,10 @@ export default { dispatch("registerListener", {type: "click", listener: "updateClick", listenerType: "dispatch"}); if (rootState.configJson.Portalconfig.mapView?.twoFingerPan) { - window.addEventListener("touchmove", (event) => dispatch("oneFingerDragMessage", event)); - window.addEventListener("touchend", (event) => dispatch("oneFingerDragMessageEnd", event)); + const mapDiv = document.getElementById("map"); + + mapDiv.addEventListener("touchmove", (event) => dispatch("oneFingerDragMessage", event)); + mapDiv.addEventListener("touchend", (event) => dispatch("oneFingerDragMessageEnd", event)); } dispatch("setViewAttributes", map.getView()); @@ -219,6 +221,7 @@ export default { * Removes the touchmove and touchend event listeners added for the two finger pan alert message * @param {Object} param.dispatch the dispatch * @param {Object} param.commit the commit + * @param {Element} mapDiv html element of the map * @param {Event} event touchend * @returns {void} */ @@ -229,7 +232,10 @@ export default { if (event.targetTouches?.length === 0) { commit("setTwoFingerPanStart", false); } - window.removeEventListener("touchmove", dispatch("oneFingerDragMessage")); - window.removeEventListener("touchend", dispatch("oneFingerDragMessageEnd")); + + const mapDiv = document.getElementById("map"); + + mapDiv.removeEventListener("touchmove", dispatch("oneFingerDragMessage")); + mapDiv.removeEventListener("touchend", dispatch("oneFingerDragMessageEnd")); } };