From 6811a31f0c520599456433ea3e1c2c9b54d0bd89 Mon Sep 17 00:00:00 2001 From: Nees Jan van Eck Date: Mon, 24 Oct 2022 15:15:46 +0200 Subject: [PATCH] Fix largest component issue --- src/component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component.js b/src/component.js index c0a63f2..1955588 100644 --- a/src/component.js +++ b/src/component.js @@ -100,7 +100,7 @@ const VOSviewer = withResizeDetector(observer(({ width, targetRef, parameters = webworkerStore.setRunClustering(dataStore.networkDataIsAvailable && !dataStore.clustersAreAvailable); visualizationStore.setItemIdToIndex(data.itemIdToIndex); - if (!_isUndefined(visualizationStore.largestComponent)) { + if (!_isUndefined(visualizationStore.largestComponent) && data.hasUnconnectedItems) { webworkerStore.startHandleUnconnectedItems({ unconnectedItemsDialogChoice: visualizationStore.largestComponent ? 'yes' : 'no', mapData: dataStore.mapData, networkData: dataStore.networkData, itemIdToIndex: visualizationStore.itemIdToIndex }); } else if (!dataStore.coordinatesAreAvailable && data.hasUnconnectedItems) { uiStore.setUnconnectedItemsDialog(data.hasUnconnectedItems, data.nItemsNetwork, data.nItemsLargestComponent);