Perspective Tooltip

Hi,

Is there an option for mouseover tooltip in perspective?

1 Like

I remember seeing that this had to be disabled as an option by the developers. You can most likely bodge one to appear. Have a look at the perspective Ad-Hoc charts on the exchange - I think I remember seeing that they got tooltips to appear below the menu

2 Likes

I’ve got this to work (stolen from Ad-Hoc charts, :tada:) but wondering the difference between visibility properties:

self.getChild('Tooltip').props.style.visibility = 'hidden'
self.getChild("Tooltip").position.display = False
self.getChild("Tooltip").meta.visible = False
1 Like

You can check the actual layout/CSS in browser devtools, but I believe props.style.visiblity and meta.visible would do the same thing - make the component invisible. position.display (which should only be an option in flex based containers) makes a component invisible, and prevents it from being part of layout - a crucial difference.

Thank you!

Also, this may be obvious, but i’m guessing at least the onMouseEnter event must be applied on parent containers (that do not hide), as it seems if applied directly to a component itself, the onMouseLeave event triggers successfully, but the onMouseEnter event is not triggered when/if the component is hidden?

Perhaps this might be why the option was “disabled as an option by the developers”?

The HMI i’m duplicating relies heavily on tooltips for equipment identification/tag names - I’ll need to create parent containers with tooltip components/parameters for every equipment instance (using template views) - wish it was just a checkbox on components, but definitely glad to have a workaround!

Better solution (for me) changing the opacity property on hover via a custom style instead of component events (and thus no need for parent containers). Bonus: hover actions are visible in designer (preview mode). Examples attached.

base style:
opacity: 0,

element state [hover]:
opacity: 0.90

Wish I could add position: absolute (for positioning on top of other flex-container objects) to the custom style instead of manually to the tooltip component style, but I guess there’s a reason it’s not available in the style properties GUI.

Motor Tooltip.zip (4.1 KB)

5 Likes

what do you do if your tooltip inside flex? Like Ad hoc example. in this case, you don’t hover over the tooltip.

Indeed I also found this doesn’t work inside flex. I do not have a solution for that. :confused:

Please share if you come up with a workaround!

How do you get the tooltip to be positioned right in the middle of your component?