Open valkyrjas074 opened 1 month ago
There's nothing wrong with the configuration you've posted, so the issue must be something else on your page. I would guess that it's something CSS related, given that's how the tooltips are displayed.
Sorry for the delay. Somehow the text works when hover but it got too big and the panorama got a little white space above, I'd tried to add !important in the .css but it didn't work.
You're changing the font size in the context of the Pannellum <div>
, and Pannellum doesn't reset it. Adding this to your CSS should work:
.pnlm-container {
font-size: 16px;
}
Typically, folks set the font size on p
, h1
, h2
, etc., not on an element that would affect Pannellum, which I suspect is why this issue has not previously been reported. Hot spot text was the only place in Pannellum that the font size was not explicitly set, but I changed this in 1eaccef60f75c8553997b37fe5d9784b2ed7b07a to avoid this in the future (using the same CSS suggested above).
The problem is that I have another .css loaded so add font-size to all of them make it works. Somehow the panorama 2F in my site doesn't fit the container, do you know why?
/* Basic styling for the entire page */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
html {
scroll-behavior: smooth;
}
/* Link styling */
a {
text-decoration: none;
}
/* Styling for the panorama container */
#panorama1, #panorama2, #panorama3, #panorama4, #panorama5, #panorama6, #panorama7, #panorama8 {
width: 100%;
height: 500px; /* Adjust this height as per your needs */
background-color: #f9f9f9; /* Optional background while panorama loads */
font-size: 16px !important;
}
.hotspot {
font-size: 16px; /* Set the font size to 10px */
color: #000; /* Optional: Set the text color */
position: relative; /* Ensure it's positioned correctly within the panorama */
}
.floor-map {
display: flex;
flex-direction: column;
}
.floor {
cursor: pointer;
padding: 10px;
margin: 5px;
background-color: lightgray;
}
.floor.active {
background-color: lightblue;
}
.photo {
display: none;
}
.photo.active {
display: block;
}
It seems to have 20-25px of top padding added to the panorama <div>
, although it's not in the CSS you posted.
I don't know why my hotspots are not showing text when hover (especially info type). This is parts of my code, I've tried to make some changes in pannellum.js but it doesn't fix the problem.