Elius94 / react-photo-sphere-viewer

Photosphere Viewer for React.JS
MIT License
65 stars 21 forks source link

[Feature]: Add Close Icon on React Photo Sphere Viewer #49

Closed raoehtesham03 closed 8 months ago

raoehtesham03 commented 8 months ago

What do you want?

When the Photo Sphere Window opens , it should also have close window icon. So, that user can close the window.

Why do you want it?

I am integrating this with my application.But when the Photo Sphere Window opens up it does not have close icon.

How do you implement it?

Just Add close window icon in top right corner.

Are you interested in developing this feature?

Elius94 commented 8 months ago

Hey! Which windows do you mean? There's no window... 🤔

raoehtesham03 commented 8 months ago

@Elius94 If I open the Photo Sphere viewer in the same window and then want to open it for the next image, I would have to go back to the page first and then click on the next image. It would be better if I also had the functionality to add a close icon, which would close the React Photo Sphere viewer.

Elius94 commented 8 months ago

I'm not sure about what you mean! I'm Sorry. Can you upload some screenshot or video?

raoehtesham03 commented 8 months ago
Screenshot 2024-02-06 at 6 02 23 PM

I meant to say there should be a close icon in the corner to close the React Photo Sphere Viewer, similar to the one depicted in the image above. @Elius94

Elius94 commented 8 months ago

image

Ok, and what happen when you close "react photo sphere viewer"? Go back to the previous history?

raoehtesham03 commented 8 months ago

@Elius94 yeah It should go back to the previous page.

How did you do it @Elius94 ?

Elius94 commented 8 months ago

Ok, I'm starting to understand what you say... By default, React Photo sphere Viewer is only a viewer. Like a youtube video player. So it does not handle other external user interfaces. So for this things you have to wrap it on a particular container and manage close command separatelly. This because the library only draw the viewer.

In my example, the "X" only close the navbar, not the psv. Make a React Button that hide the viewer on click

raoehtesham03 commented 8 months ago

Is there any possibility that in the near future we could have this functionality, @Elius94 ?

Elius94 commented 8 months ago

No, because it is something that doesn't make sense for what the viewer is supposed to do! You can include the viewer inside a component and then define its size and visibility dynamically like any React component.

It doesn't make sense for it to have an "X" button, it would be like wanting the close button on an <img src"..." />

I hope you understand what I mean. Thanks