Select to view content in your preferred language

How can I hide/slide a widget out of view

3116
2
Jump to solution
02-18-2014 11:48 AM
YohanBienvenue
Frequent Contributor
Hi,

Would it be be possible to modify the Layer List widget so that users could easily show it when needed, and easily hide it when it's not needed. Currently we use the Map Switcher widget and a complaint from end users is that people keep accidentally opening it with the mouse when they hover over the Map Switcher button, and also they don't like that it automatically disappears on mouseout when they would like it to stay open.

If I just replace the Map Switcher widget with the Layer List widget, and I align it to the right with right=0, it kinda works but it's not really quick/easy to open or minimize. Plus if I resize the window the widget is not really docked to the right.

I remember seeing a demo with the Attributes Table widget where you could hide the widget in the bottom of the screen. There's even still the screenshots in the documentation, although all samples I've found use a floating widget:



You would click on that yellow bar and it would show/hide the widget in the bottom of the viewer.

I'm thinking something similar to this, but on the right side of the screen with a widget container or the layer list widget might do what they want. Is this a crazy idea? I have access to the viewer source code and can also play around with skins and such if needed. Does anything know if something like this already exist? Any sample code I could use as a starting point?

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Yohan,

   Actually that is pretty simple to do just add another widget container like this to your main config.xml

    <widgetcontainer paneltype="right" initialstate="collapsed" size="300">             <widget label="Layer List"                 config="widgets/LayerList/LayerListWidget.xml"                 url="widgets/LayerList/LayerListWidget.swf"/>     </widgetcontainer>

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Yohan,

   Actually that is pretty simple to do just add another widget container like this to your main config.xml

    <widgetcontainer paneltype="right" initialstate="collapsed" size="300">             <widget label="Layer List"                 config="widgets/LayerList/LayerListWidget.xml"                 url="widgets/LayerList/LayerListWidget.swf"/>     </widgetcontainer>
0 Kudos
YohanBienvenue
Frequent Contributor
Awesome, thanks Robert. I figured it would be something this easy but my google-fu failed me. Also I now see this is actually in the Attributes Widget documentation, but strangely not in the Widget Container documentation.

In any case this is exactly what I wanted as a starting point and now I can continue with this idea.
Thank you very much.

Yohan
0 Kudos