File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 430430}
431431
432432/* Disable pointer events where they'd interfere with the intended action. */
433+ .mapml-feature-index-box ,
433434.leaflet-tooltip ,
434435.leaflet-crosshair * ,
435436.mapml-layer-item-settings .mapml-control-layers summary label ,
Original file line number Diff line number Diff line change @@ -40,13 +40,18 @@ export var FeatureIndexOverlay = L.Layer.extend({
4040 body . allFeatures = [ ] ;
4141 keys . forEach ( i => {
4242 let layers = features [ i ] . layer . _layers ;
43- let keys = Object . keys ( layers ) ;
4443 let bounds = L . bounds ( ) ;
45- keys . forEach ( j => {
46- if ( ! bounds ) bounds = L . bounds ( layers [ j ] . _bounds . min , layers [ j ] . _bounds . max ) ;
47- bounds . extend ( layers [ j ] . _bounds . min ) ;
48- bounds . extend ( layers [ j ] . _bounds . max ) ;
49- } ) ;
44+
45+ if ( layers ) {
46+ let keys = Object . keys ( layers ) ;
47+ keys . forEach ( j => {
48+ if ( ! bounds ) bounds = L . bounds ( layers [ j ] . _bounds . min , layers [ j ] . _bounds . max ) ;
49+ bounds . extend ( layers [ j ] . _bounds . min ) ;
50+ bounds . extend ( layers [ j ] . _bounds . max ) ;
51+ } ) ;
52+ } else if ( features [ i ] . layer . _bounds ) {
53+ bounds = L . bounds ( features [ i ] . layer . _bounds . min , features [ i ] . layer . _bounds . max ) ;
54+ }
5055
5156 if ( featureIndexBounds . overlaps ( bounds ) ) {
5257 let group = features [ i ] . path ;
You can’t perform that action at this time.
0 commit comments