@abi-software/flatmap-viewer 2.2.1-beta.8 → 2.2.1-beta.9
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 +11 -2
- package/src/styling.js +2 -1
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.1-beta.
|
|
41
|
+
* ``npm install @abi-software/flatmap-viewer@2.2.1-beta.9``
|
|
42
42
|
|
|
43
43
|
Documentation
|
|
44
44
|
-------------
|
package/package.json
CHANGED
package/src/interactions.js
CHANGED
|
@@ -649,7 +649,10 @@ export class UserInteractions
|
|
|
649
649
|
&& !('labelled' in properties)) {
|
|
650
650
|
let tooltip = '';
|
|
651
651
|
const label = properties.label;
|
|
652
|
-
|
|
652
|
+
const cleanLabel = (label.substr(0, 1).toUpperCase() + label.substr(1)).replaceAll("\n", "<br/>");
|
|
653
|
+
if (!tooltips.includes(cleanLabel)) {
|
|
654
|
+
tooltips.push(cleanLabel);
|
|
655
|
+
}
|
|
653
656
|
}
|
|
654
657
|
}
|
|
655
658
|
if (tooltips.length === 0) {
|
|
@@ -814,11 +817,17 @@ export class UserInteractions
|
|
|
814
817
|
}
|
|
815
818
|
info = `<div id="info-control-info">${htmlList.join('\n')}</div>`;
|
|
816
819
|
}
|
|
817
|
-
this.activateFeature_(feature);
|
|
818
820
|
if ('nerveId' in feature.properties) {
|
|
821
|
+
if (feature.properties.active) {
|
|
822
|
+
this.activateFeature_(feature);
|
|
823
|
+
} else {
|
|
824
|
+
tooltip = '';
|
|
825
|
+
}
|
|
819
826
|
if (feature.properties.nerveId !== feature.properties.featureId) {
|
|
820
827
|
this.activateNerveFeatures_(feature.properties.nerveId);
|
|
821
828
|
}
|
|
829
|
+
} else {
|
|
830
|
+
this.activateFeature_(feature);
|
|
822
831
|
}
|
|
823
832
|
if ('hyperlink' in feature.properties) {
|
|
824
833
|
this._map.getCanvas().style.cursor = 'pointer';
|
package/src/styling.js
CHANGED
|
@@ -454,7 +454,8 @@ export class FeatureNerveLayer extends VectorStyleLayer
|
|
|
454
454
|
['boolean', ['feature-state', 'active'], false], '#222',
|
|
455
455
|
['boolean', ['feature-state', 'selected'], false], 'red',
|
|
456
456
|
['boolean', ['feature-state', 'hidden'], false], '#CCC',
|
|
457
|
-
'#888'
|
|
457
|
+
['boolean', ['get', 'active'], false], '#888',
|
|
458
|
+
'#FFF'
|
|
458
459
|
],
|
|
459
460
|
'line-opacity': [
|
|
460
461
|
'case',
|