Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display context menu on Pannellum #123

Open
ghost opened this issue Jun 29, 2023 · 0 comments
Open

Display context menu on Pannellum #123

ghost opened this issue Jun 29, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 29, 2023

I am trying to create an app where teachers will be able to set mathematical questions in hotspots, if the students give a correct answer than they are allowed to access the content from the hotspot.

But in order to do that I need to somehow get the current position (yaw and pitch) the teacher clicks in the screen and then display a context menu, with an option to add a question, I've thought of this by setting on the Pannellum component a false prop in draggable, but by doing so I am unable to click on the screen whatsoever.

I would control the position accordingly to this example page

<Pannellum
    width="100%"
    height="100%"
    image={currentScene}
    yaw={300}
    pitch={0}
    hfov={110}
    draggable={false}
    autoLoad
    compass
    showZoomCtrl={false}
    mouseZoom={false}
    onMousedown={() => {
      // custom action to display a context menu
    }}>
    <Pannellum.Hotspot
        type="custom"
        pitch={-30}
        yaw={-120}
        handleClick={() => console.log('clicked')} />
</Pannellum>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants