Return empty "bounds" value for closed popovers

Idea created by mattman on Dec 5, 2017
    Active
    Score10

    As far as I'm aware, there is no way to determine, programmatically, if a popover is showing or not. A direct example of where this might be useful is when a script trigger preempts a direct click on a popover button.

     

    Example: If you place a popover within a portal row and you have an OnObjectEnter on both the portal and the popover, within the portal, the OnObjectEnter for the portal will trigger first. This makes sense since the portal had to be "clicked through" to click on the popover button.

     

    However, it's the popover button which was clicked by intention and in order to bypass the OnObjectEnter script on the portal we need to programmatically determine whether the popover is showing or not.

     

    While the initial thought would be to use the isObjectHidden attribute of GetLayoutObjectAttribute() this would not be desirable because it's tied directly to the Hide Calculation, not whether the popover is showing or not.

     

    So what is the next best thing?

     

    GetLayoutObjectAttribute ( "some.popover.object" ; "bounds" ) should reliably return an empty result when the popover is not showing.

     

    This makes sense because if a popover is not showing on screen it should not logically have any bounds. Currently, the result of the bounds attribute returns the last known screen dimensions as far as I can tell.