Hi again,
One additional question: I'm building image and text hotspots, and have customized a skin that will scale an image to 200% when it's hovered over. To make sure it is visible over the text box, I set the z-index to 100 on that item. That works fine and well.
But, some of my text is long enough that it requires a scroll bar currently, which I personally don't like. So, I'm trying to get the text container to enlarge to 200% when it is hovered over. I've figured that out no problem, but with the image at a z-index of 100, it of course obscures/covers the enlarged text box.
So, my questions:
1. Is there a way to go about this differently, perhaps by setting the visibility of the one item to change based on the mouse hovering over a different item? In other words, could I set it so "popup_body_text" becomes invisible when hovering over "popup_image" (which will be scaling then) and vice versa?
2. Alternatively, is there a way to toggle the z-index of an element based on the hover-state of another element, per above?
Thanks!
Change visibility based on hover
-
- Posts: 51
- Joined: Mon Jan 04, 2021 8:20 pm
Answering my own question here as best I can. I wasn't able to find or implement a z-index solution, but ended up building a solution on my own that works to my purposes.
Again, the desire was for an image to appear with text to the side when a hotspot is clicked. And, I wanted the image on the left to zoom when hovered over so viewers could see more detail, which necessitated making the text box disappear at the same time. Additionally, I wanted the text box to expand when hovered over so text would be read more easily and without a scrollbar if it was longer. In turn, this required making the image and the loading image disappear when hovering over the text box.
I finally got it worked out - as a newbie at Pano2VR, it took some figuring - but I think it's workable for the most part. I'd love anyone's thoughts on what should be done differently:
And, a question: I could not add a time element to the actions making the text disappear when image is hovered over, and vice versa. Is there a way to make the appearance/disappearance more smooth?
Thanks,
- Jake
Jake Norton
www.jakenorton.com
Again, the desire was for an image to appear with text to the side when a hotspot is clicked. And, I wanted the image on the left to zoom when hovered over so viewers could see more detail, which necessitated making the text box disappear at the same time. Additionally, I wanted the text box to expand when hovered over so text would be read more easily and without a scrollbar if it was longer. In turn, this required making the image and the loading image disappear when hovering over the text box.
I finally got it worked out - as a newbie at Pano2VR, it took some figuring - but I think it's workable for the most part. I'd love anyone's thoughts on what should be done differently:
And, a question: I could not add a time element to the actions making the text disappear when image is hovered over, and vice versa. Is there a way to make the appearance/disappearance more smooth?
Thanks,
- Jake
Jake Norton
www.jakenorton.com