Aller au contenu principal

Add the ability to close the expand component as soon as an item within the component has been clicked

Répondu

Commentaires

10 commentaires

  • Commentaire officiel
    Conner Leverett

    Hi Marina,

    There is currently a way to close the expand component through the "ui.set-visual-state" command. This can be chained before the command/operations like such:

    You can find the id of the expand component using VertiGIS Studio Item Manager. This command could also be used to open the expand by setting the "visualState" argument to "open".

  • Marina Bösche

    Thanks Connor! This works like a charm and is exactly what I was looking for!

    0
  • Marina Bösche

    Hi Connor,

    I have an additional question regarding the way to close the expand component you mentioned. This works fine when using components having events. However, it does not seem to work for the layer presets component. When putting a layer presets component into a expand component I do not see a way to close the expand component when clicking on a layer preset because the layer presets do not contain events in which you can configure the custom command you mentioned. Is there a way to close the expand component when using layer presets within the expand component?

    Thanks,

    Marina

     

    0
  • Raquel Sanchez

    Connor,

    None of my Expand Components has an Events option.  Can you advise on where we need to place this if not available in the component.

    Raquel

    0
  • Scott Corwin

    Hi, is this possible with on premise?  the ui.set-visual-state command appears to be web only.

     

    Thank you

    0
  • Surya Rathanlal

    Hi Marina Bösche @Conner

    I'm trying to do the exact same thing. Did you use ‘Event service’ in the VertiGIS Web designer to close the Expand component when a basemap is selected? If so, which event did you listen to and trigger the command to close the Expand. I followed along the browser console to see which events are being fired when a basemap is selected, but could not find a consistent distinct event that can be used.

    Appreciate any help on this, Thanks!

    0
  • Marina Bösche

    Hi Surya,

    You have to add the command ui.set-visual-state tot the specific basemap using the Events section.

     

    You can find the ID of the basemap-picker expand component using CTRL + SHIFT + E in the VertiGIS Studio Web Designer. Turn on ‘Show Layout’ and search for the basemap picker.

    0
  • Surya Rathanlal

    Thank you, Marina! I was trying to this the roundabout way by creating an event listener. Didn't notice the basemap had the Event feature! Got it to working! 

    And for Layer Presets, I do not see this section and I believe this functionality can be achieved by using an Event listener. I see VertiGIS has added new events for Layer Presets, were you able to use it to close the Expand? We are at an older version of Web and need to upgrade to use this event.

    0
  • Marina Bösche

    Hi Surya, no I was not able to achieve this for the layer presets yet.

    0
  • Vegard Sulebakk

    Using ui.set-visual-state works fine, but the Expand-component should still support auto-closing when a child-item has been clicked. 

    1

Vous devez vous connecter pour laisser un commentaire.