@@ -8,20 +8,22 @@ import {ascending, descending, extent, min, rollup} from 'd3-array';
8
8
import { ScaleLinear , scaleSqrt } from 'd3-scale' ;
9
9
import KDBush from 'kdbush' ;
10
10
import {
11
+ ParametricSelector ,
11
12
createSelector ,
12
13
createSelectorCreator ,
13
14
defaultMemoize ,
14
- ParametricSelector ,
15
15
} from 'reselect' ;
16
16
import { alea } from 'seedrandom' ;
17
- import { clusterLocations } from './cluster/cluster' ;
17
+ import FlowmapAggregateAccessors from './FlowmapAggregateAccessors' ;
18
+ import { FlowmapState } from './FlowmapState' ;
18
19
import {
19
- buildIndex ,
20
20
ClusterIndex ,
21
- findAppropriateZoomLevel ,
22
21
LocationWeightGetter ,
22
+ buildIndex ,
23
+ findAppropriateZoomLevel ,
23
24
makeLocationWeightGetter ,
24
25
} from './cluster/ClusterIndex' ;
26
+ import { clusterLocations } from './cluster/cluster' ;
25
27
import getColors , {
26
28
ColorsRGBA ,
27
29
DiffColorsRGBA ,
@@ -31,18 +33,16 @@ import getColors, {
31
33
isDiffColors ,
32
34
isDiffColorsRGBA ,
33
35
} from './colors' ;
34
- import FlowmapAggregateAccessors from './FlowmapAggregateAccessors' ;
35
- import { FlowmapState } from './FlowmapState' ;
36
36
import {
37
37
addClusterNames ,
38
38
getFlowThicknessScale ,
39
39
getViewportBoundingBox ,
40
40
} from './selector-functions' ;
41
41
import {
42
+ TimeGranularityKey ,
42
43
getTimeGranularityByKey ,
43
44
getTimeGranularityByOrder ,
44
45
getTimeGranularityForDate ,
45
- TimeGranularityKey ,
46
46
} from './time' ;
47
47
import {
48
48
AggregateFlow ,
@@ -55,11 +55,10 @@ import {
55
55
FlowLinesLayerAttributes ,
56
56
FlowmapData ,
57
57
FlowmapDataAccessors ,
58
- isCluster ,
59
- isLocationClusterNode ,
60
58
LayersData ,
61
59
LocationFilterMode ,
62
60
LocationTotals ,
61
+ isLocationClusterNode ,
63
62
} from './types' ;
64
63
65
64
const MAX_CLUSTER_ZOOM_LEVEL = 20 ;
@@ -753,7 +752,9 @@ export default class FlowmapSelectors<
753
752
const ids = this . _getLocationsInBboxIndices ( tree , bbox ) ;
754
753
if ( ids ) {
755
754
return new Set (
756
- ids . map ( ( idx : number ) => tree . points [ idx ] . id ) as Array < string > ,
755
+ ids . map ( ( idx : number ) =>
756
+ this . accessors . getLocationId ( tree . points [ idx ] ) ,
757
+ ) as Array < string > ,
757
758
) ;
758
759
}
759
760
return undefined ;
0 commit comments