Pannellum hot spots problem

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
Answered
0
0

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

  • You must to post comments
Best Answer
1
1

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.

  • You must to post comments
1
0

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

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

  • Luca (ITG)
    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.
  • Cristian Zerbinati
    Thank you!
  • You must to post comments
Showing 4 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json mixin.theme