Select to view content in your preferred language

Extra white space in LayerList widget

808
6
Jump to solution
06-08-2023 09:50 PM
Aeseir
by
Frequent Contributor

Is is possible to remove excessive whitespace in LayerList widget when you have selectionEnabled as true?

Only happens when group layer is empty and selectionEnabled is true.

 

Example codepen.

 

Visual example:

 

Aeseir_0-1686286184981.png

 

0 Kudos
1 Solution

Accepted Solutions
Sage_Wall
Esri Regular Contributor

I've been looking into this and you might be able to add this css style to remove it but I'm not sure if it would cause issues elsewhere without further testing.

https://codepen.io/sagewall/pen/qBQEQzd

 

 

    .esri-layer-list__list:empty {
      min-height: 0px;
    }

 

 

 

View solution in original post

0 Kudos
6 Replies
Sage_Wall
Esri Regular Contributor

Thanks for point this out @Aeseir it looks like a bug to me. I can create an internal issue. If you want to keep track of it you could submit a bug though support and you'll get updates.

0 Kudos
Aeseir
by
Frequent Contributor

I am not fussed one way of the other, let me know what is easier for you.

0 Kudos
Sage_Wall
Esri Regular Contributor

I've been looking into this and you might be able to add this css style to remove it but I'm not sure if it would cause issues elsewhere without further testing.

https://codepen.io/sagewall/pen/qBQEQzd

 

 

    .esri-layer-list__list:empty {
      min-height: 0px;
    }

 

 

 

0 Kudos
Aeseir
by
Frequent Contributor

This works, tested it before and haven't found any issues....yet.

 

If your team wants visible white space to indicate a "landing" spot when user drags the content you can also handle it this way:

.esri-layer-list__list:empty {
      min-height: 0px;
}

.esri-layer-list__item:hover > .esri-layer-list__list{
      min-height: 48px;
}
Sage_Wall
Esri Regular Contributor

Thanks for the suggestion. The extra white space is intended to indicate that a layer can be dragged into the group layer, but the design can certainly be improved. Appreciate you pointing this out.

0 Kudos
Aeseir
by
Frequent Contributor

Not a problem. In that case recommend making it clearly visible with additional markers (e.g. dotted border or such) as some of our less visibly capable users struggle to differentiate what the white space refers to.

Thanks again for the support.

0 Kudos