@abi-software/flatmap-viewer 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.rst +1 -1
- package/package.json +1 -1
- package/src/interactions.js +8 -3
package/README.rst
CHANGED
|
@@ -38,7 +38,7 @@ The map server endpoint is specified as ``MAP_ENDPOINT`` in ``src/main.js``. It
|
|
|
38
38
|
Package Installation
|
|
39
39
|
====================
|
|
40
40
|
|
|
41
|
-
* ``npm install @abi-software/flatmap-viewer@2.2.
|
|
41
|
+
* ``npm install @abi-software/flatmap-viewer@2.2.3``
|
|
42
42
|
|
|
43
43
|
Documentation
|
|
44
44
|
-------------
|
package/package.json
CHANGED
package/src/interactions.js
CHANGED
|
@@ -837,8 +837,8 @@ export class UserInteractions
|
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
-
selectionEvent_(
|
|
841
|
-
|
|
840
|
+
selectionEvent_(event, feature)
|
|
841
|
+
//=============================
|
|
842
842
|
{
|
|
843
843
|
const multipleSelect = event.ctrlKey || event.metaKey;
|
|
844
844
|
if (!multipleSelect) {
|
|
@@ -874,9 +874,14 @@ export class UserInteractions
|
|
|
874
874
|
{
|
|
875
875
|
this.clearActiveMarker_();
|
|
876
876
|
const clickedFeature = this._map.queryRenderedFeatures(event.point)[0];
|
|
877
|
+
const originalEvent = event.originalEvent;
|
|
877
878
|
if (clickedFeature === undefined || this._activeFeatures.length === 1) {
|
|
878
|
-
this.selectionEvent_(
|
|
879
|
+
this.selectionEvent_(originalEvent, clickedFeature);
|
|
879
880
|
} else if (this._activeFeatures.length > 1) {
|
|
881
|
+
const multipleSelect = originalEvent.ctrlKey || originalEvent.metaKey;
|
|
882
|
+
if (!multipleSelect) {
|
|
883
|
+
this.__unselectFeatures();
|
|
884
|
+
}
|
|
880
885
|
for (const feature of this._activeFeatures) {
|
|
881
886
|
this.selectFeature_(feature.id);
|
|
882
887
|
}
|