Skip to content

Pannellum hot spots problem #1365

Closed
Closed

Description

@itg-assistant

Cristian Zerbinati asked 2018-02-10 09:31:33 UTC

Hi,

at now I'm using this extension http://demo.wisej.com/pannellum

and wisej version 1.4.59.0

time ago the URL for hot spots, type "info" and "scene" worked... But now the hot spot is not working. Olso your example don't work any more.

is it possible that it is caused by an update of wisej?

Another question

is it possibile to do events when click on a specific hot spot? for example open a wisej form with information?

could someone show me how to use eval or call to call the methods directly?

please help me I have the project blocked

thanks

Cristian

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2018-02-13 23:53:25 UTC

    You have to add an hotspot click handler to the pannellum definition: https://pannellum.org/documentation/reference/

    I have added this to startup.js

    // add hotspot click handler.
     if (options.hotSpots) {
         var handler = this._onHotSpotClick.bind(this);
         for (var i = 0; i < options.hotSpots.length; i++) {
           var hs = options.hotSpots[i];
           hs.clickHandlerArgs = qx.lang.Object.clone(hs);
           hs.clickHandlerFunc = handler;
        }
     }
    

    and

    /**
     * Click handler for the hotspots.
     */
    this._onHotSpotClick = function (e, hotspot) {
       this.fireWidgetEvent("hotspot", hotspot);
    }
    

    It will fire the "hotspot" event in the WidgetEvent handler. The e.Data dynamic object will be the full hotspot object. In C# the handler looks like this:

    private void Pannellum1_WidgetEvent(object sender, WidgetEventArgs e)
     {
        if (e.Type == "hotspot")
           AlertBox.Show(e.Data.text); // e.Data is dynamic and has all the hotspot fields.
     }
    

    See attached modified sample extension.

  2. added
    BugSomething is broken or behaving unexpectedly.
    on Jun 12, 2026
  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Cristian Zerbinati answered 2018-02-14 09:58:22 UTC

    Hi Luca,

    best support ever!!! thank you so much.

    I am a programmer of desktop application, but from your post I'm also learning javascript.

    When you have time, you can tell me why the href url of the hotspots not work anymore?

    thanks

    Cristian

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2018-02-14 19:40:28 UTC

    I don’t think the URL property ever worked. Wisej serializes the .NET objects to JSON and automatically converts the fields to lowercase first (or camel casing). So the hotspot.URL property was serialized to hotspot.uRL. Which is a bug – it should leave the uppercase when all (or the second) characters are upper case. It is also possible that now with the click handler, it’s up to your code to handle the URL.

  5. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Cristian Zerbinati answered 2018-02-15 09:02:17 UTC

    Thank you!

  6. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Alex Prinias answered 2018-02-16 06:48:48 UTC

    Hi guys,

    Not really a relevant question to the current thread, but a more general one: where was this "pannellum" announced/blogged or whatever? I can't find it either in extensions or examples or blog. Is there some other "hidden" source of information we should be aware of?

    Best,
    Alex

  7. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Frank (ITG) answered 2018-02-16 07:17:35 UTC

    Hi Alex,

    it was a customer´s question that made us check it and create a sample and extension:

    http://wisej.com/support/question/request-360-panorama-photo

    We´ll look into integrating it into our extension + samples sections and also create a blog to explain / promote it.

    It´s just a matter of time :-)

    Best regards
    Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken or behaving unexpectedly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions