Hi All,
I've opened a support ticket about this, but I thought I would also post this to the forum community (and the resident CSS wizards!) because this seems like an interesting problem
Ignition: 8.1.32
Browser: Chrome 122.0.6261.95
I have an X-Y coord (fixed) container with an image component and a view canvas overlaid on it. The image component displays an SVG background image for a plant operation and the view canvas displays instances of plant data points. In this example, the instances are essentially arrows that show conveyor status and direction. When a user hovers over any instance a style called "x2" (defined in stylesheet.cs) transforms the arrow, essentially magnifying it by 200%.
x2 style class
.psc-x2 { transition: all .2s ease-in-out; }
.psc-x2:hover { transform: scale(2) !important; z-index: 5;}
Problem:
When the user hovers over these arrows in the client and the symbol magnifies, the client adds horiz and vert scroll-bars.
This occurs even though, for each instance in the view canvas, the style prop has overflow: hidden
as an attribute, as does the root container of the embedded view definition.
If I drop instances of this view as "loose" embedded views onto a view (ie not in a view canvas), then these scroll bars do not appear when the "x2" style hover transform is activated. The embedded view behaves properly.
If I inspect the browser dev tools in Chrome and dig into the view canvas div element, I can see that there is an overflow: auto
attribute added that would explain the scroll-bars on magnify, but I have no idea where this attribute is coming from. You can see in the screenshot below that the position, height, width, top, left, bottom, and right attributes from the instance props match the instance div in the browser, but the overflow: hidden
in the instance style prop is applied one layer "down" in a child div element.
So, the million dollar question is: where does the overflow: auto
come from? - and is there any way to override this at runtime, either by css injection on the view canvas component, or in the stylesheet.css file?