mistic100 / Photo-Sphere-Viewer

A JavaScript library to display 360° sphere panoramas.
https://photo-sphere-viewer.js.org
MIT License
1.94k stars 687 forks source link

Tooltip functionality not working for polygons after changes from issue #1334 #1349

Closed shahet1124 closed 4 months ago

shahet1124 commented 4 months ago

Describe the bug

I've been working with the polygon markers in your viewer plugin and noticed that the tooltip functionality does not seem to work correctly when applied to polygons. While I can successfully create and display polygons with associated content, tooltips do not appear on hover as expected.

It worked before. But I made changes suggested in this issue #1344 then after it stopped working.

Here's the exact code snippet that worked before:

{
                                    id: 'product-1',
                                    polygon: [
                                        [0.596416174082061, -0.09412586265209733],
                                        [0.6643120055120949, -0.16225545829868682],
                                        [0.5974112353942319, -0.1626270065733766],
                                        [0.6542901056941313, -0.09226165407034559]
                                    ],
                                    tooltip: 'Samsung Galaxy TAB S6',
                                    style: {
                                            fill: 'rgba(255, 0, 0, 0.5)',
                                            stroke: 'rgba(255, 0, 0, 0.8)',
                                            strokeWidth: '2px'
                                        },
                                        content: '<p>The Samsung Galaxy Tab S6, released in August 2019, features a 10.5-inch Super AMOLED display with a resolution of 2560 x 1600 pixels. It is powered by the Qualcomm Snapdragon 855 processor, with options for 6 GB or 8 GB of RAM and 128 GB or 256 GB of storage, expandable via microSD. The tablet includes a dual rear camera setup (13 MP + 5 MP), an 8 MP front camera, and a 7040 mAh battery with fast charging. Key features include the S Pen, DeX mode for a desktop-like experience, quad speakers tuned by AKG, and an in-display fingerprint scanner. It runs on Android with Samsung\'s One UI.</p> <a href="https://amzn.in/d/1vqujtk"> <img src="https://m.media-amazon.com/images/I/31qVIrbLqJL._SY300_SX300_QL70_FMwebp_.jpg"/></a>',
                                },

Online demo URL

No response

Photo Sphere Viewer version

5.8.1

Plugins loaded

MarkersPlugin, VirtualTourPlugin

OS & browser

Windows 11, Firefox

Additional context

No response

webmazz commented 4 months ago

@shahet1124, try add this to css: .psv-markers-svg-container { z-index: 31; }

github-actions[bot] commented 4 months ago

This feature/bug fix has been released in version 5.8.2.