out of visibility range layers do not grey out in the webapp builder layer list widget, can this be changed programmatically?
Solved! Go to Solution.
Thanks Robert it works great. This will be very helpful for my users so I don't have to explain why something is not showing up and that they might have to just zoom in a little bit.
-Stan
This enhancement does not seem to work with WAB version 1.2. Looks like the code for the LayerListView.js has changed a bit compare to version 1.1.
On the initial load the Map Services seem to be grayed out appropriately but the sub-layers that are listed within the Map Service are all grayed out all of the time. Zooming in and out does not update what should be grayed out either.
Any chance that there is an updated version for this enhancement?
Regards
Excellent, thank you Robert.
Your efforts are greatly appreciated.
Thank you for sharing. I discovered a problem with the scales at the opening, but adding this all works fine now.
startup: function () {
this.checkScale ();
},
I added the startup function to LayerListView.js, but it doesn't appear to be getting hit when the panel opens like I thought it would. Did you add any other code to get this to work correctly?
No sorry 😞
Eric,
Startup only gets called when the widget starts up. If you want something to fire when the widget opens then use onOpen function instead. Depending on your chosen theme the onOpen event may not get fired by the widget panel either.
I had to use startup. onOpen didn't work so I went with startup, works fine. I am on the default Foldable. Hope this helps. Thanks everyone.
Works a treat! Thanks Robert!