File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -110,16 +110,21 @@ export var FeatureIndex = L.Layer.extend({
110110
111111 _addOrRemoveFeatureIndex : function ( e ) {
112112 let obj = this ;
113+ let features = this . _body . allFeatures ? this . _body . allFeatures . length : 0 ;
113114 setTimeout ( function ( ) {
114115 if ( e && e . type === "focus" ) {
115116 obj . _container . removeAttribute ( "hidden" ) ;
116- obj . _output . removeAttribute ( "hidden" ) ;
117+ if ( features !== 0 ) obj . _output . removeAttribute ( "hidden" ) ;
117118 } else if ( e && e . type === "blur" ) {
118119 obj . _container . setAttribute ( "hidden" , "" ) ;
119120 obj . _output . setAttribute ( "hidden" , "" ) ;
120121 } else if ( obj . _map . isFocused ) {
121122 obj . _container . removeAttribute ( "hidden" ) ;
122- obj . _output . removeAttribute ( "hidden" ) ;
123+ if ( features !== 0 ) {
124+ obj . _output . removeAttribute ( "hidden" ) ;
125+ } else {
126+ obj . _output . setAttribute ( "hidden" , "" ) ;
127+ }
123128 } else {
124129 obj . _container . setAttribute ( "hidden" , "" ) ;
125130 obj . _output . setAttribute ( "hidden" , "" ) ;
You can’t perform that action at this time.
0 commit comments