mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.28k stars 724 forks source link

Dragging/Moving/Adding hot spots by mouse #288

Open soerenbrockmann opened 7 years ago

soerenbrockmann commented 7 years ago

Hello,

is there a way to move the hot spots by mouse until I found the right position? Or is there a function I can call on mouseup to add a hot spot? How do I get the position inside the 360° image to add the hot spot?

Best,

Sören

mpetroff commented 7 years ago

Take a look at the hot spot example:

    /*
     * Uncomment the next line to print the coordinates of mouse clicks
     * to the browser's developer console, which makes it much easier
     * to figure out where to place hot spots. Always remove it when
     * finished, though.
     */
    //"hotSpotDebug": true,

Set the hotSpotDebug parameter to true to assist with hot spot placement.

soerenbrockmann commented 7 years ago

Okay, thanks so far! By the way, do you provide paid support or recommend me someone? Or can you provide (free/paid) source code for the following project?

What I want is that a user on my platform is able to create or edit a tour. In more detail, the first image uploaded will be displayed in full browser size (not full screen) and on the bottom is a transparent div with all the other images displayed. This works so far and I can switch images on click.

The next step would involve to add text hot spots as well as transition hot spots. The idea of the latter ones is that I can place a hot spot somewhere using the mouse and select the available images to transit to from the select box. With the text hot spot is it similar but that I can just place text instead. In the best case the hot spots are draggable but on click would be ok for now as well

All changes should be saved immediately and the config or .html file updated. Alternatively, I can save the new config file into a hidden html field and create/update the config file with php.

Thanks in advance!

randypng commented 7 years ago

I've actually built something like this based off Pannellum. Drop me an email?

randy@cloverdime.com

mpetroff commented 7 years ago

I would like at some point to build an editor like that (which would also include multires tile generation). I don't expect to have time to anytime soon, though.