@abi-software/flatmapvuer 1.7.3-beta.0 → 1.7.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/dist/flatmapvuer.js +26 -41
- package/dist/flatmapvuer.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +6 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.7.3
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@abi-software/flatmap-viewer": "3.2.12",
|
|
47
|
-
"@abi-software/map-utilities": "^1.3.
|
|
47
|
+
"@abi-software/map-utilities": "^1.3.2",
|
|
48
48
|
"@abi-software/sparc-annotation": "0.3.2",
|
|
49
49
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
50
50
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -1716,7 +1716,7 @@ export default {
|
|
|
1716
1716
|
* Function to create tooltip for the provided connectivity data.
|
|
1717
1717
|
* @arg {Array} `connectivityData`
|
|
1718
1718
|
*/
|
|
1719
|
-
createTooltipForConnectivity: function (connectivityData
|
|
1719
|
+
createTooltipForConnectivity: function (connectivityData) {
|
|
1720
1720
|
// combine all labels to show together
|
|
1721
1721
|
// content type must be DOM object to use HTML
|
|
1722
1722
|
const labelsContainer = document.createElement('div');
|
|
@@ -1733,7 +1733,7 @@ export default {
|
|
|
1733
1733
|
});
|
|
1734
1734
|
|
|
1735
1735
|
this.mapImp.showPopup(
|
|
1736
|
-
|
|
1736
|
+
connectivityData[0].featureId,
|
|
1737
1737
|
labelsContainer,
|
|
1738
1738
|
{
|
|
1739
1739
|
className: 'custom-popup flatmap-tooltip-popup',
|
|
@@ -1750,7 +1750,6 @@ export default {
|
|
|
1750
1750
|
showConnectivityTooltips: function (payload) {
|
|
1751
1751
|
const { connectivityInfo, data } = payload;
|
|
1752
1752
|
const featuresToHighlight = [];
|
|
1753
|
-
const geojsonHighlights = [];
|
|
1754
1753
|
const connectivityData = [];
|
|
1755
1754
|
const filteredConnectivityData = [];
|
|
1756
1755
|
const errorData = [];
|
|
@@ -1786,31 +1785,16 @@ export default {
|
|
|
1786
1785
|
id,
|
|
1787
1786
|
label,
|
|
1788
1787
|
});
|
|
1788
|
+
featuresToHighlight.push(id);
|
|
1789
1789
|
} else {
|
|
1790
1790
|
errorData.push(connectivity);
|
|
1791
1791
|
}
|
|
1792
1792
|
});
|
|
1793
1793
|
|
|
1794
1794
|
if (filteredConnectivityData.length) {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
this.
|
|
1798
|
-
const anatomicalNodes = annotation['anatomical-nodes'];
|
|
1799
|
-
|
|
1800
|
-
if (anatomicalNodes) {
|
|
1801
|
-
const anatomicalNodesString = anatomicalNodes.join('');
|
|
1802
|
-
const foundItem = filteredConnectivityData.every((item) =>
|
|
1803
|
-
anatomicalNodesString.indexOf(item.id) !== -1
|
|
1804
|
-
);
|
|
1805
|
-
|
|
1806
|
-
if (foundItem) {
|
|
1807
|
-
geojsonId = annotation.featureId;
|
|
1808
|
-
geojsonHighlights.push(geojsonId);
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
});
|
|
1812
|
-
|
|
1813
|
-
this.createTooltipForConnectivity(filteredConnectivityData, geojsonId);
|
|
1795
|
+
// show tooltip of the first item
|
|
1796
|
+
// with all labels
|
|
1797
|
+
this.createTooltipForConnectivity(filteredConnectivityData);
|
|
1814
1798
|
} else {
|
|
1815
1799
|
errorData.push(...connectivityData);
|
|
1816
1800
|
// Close all tooltips on the current flatmap element
|
|
@@ -1824,10 +1808,6 @@ export default {
|
|
|
1824
1808
|
|
|
1825
1809
|
// highlight all available features
|
|
1826
1810
|
this.mapImp.selectFeatures(featuresToHighlight);
|
|
1827
|
-
|
|
1828
|
-
if (geojsonHighlights.length) {
|
|
1829
|
-
this.mapImp.selectGeoJSONFeatures(geojsonHighlights);
|
|
1830
|
-
}
|
|
1831
1811
|
}
|
|
1832
1812
|
},
|
|
1833
1813
|
emitConnectivityGraphError: function (errorData) {
|