Sie sind nicht angemeldet.

1

Montag, 20. Mai 2013, 23:13

Distorted hotspot html problem

Hi all

I have followed the tutorial of klause on the distorted hotspot

I have succeeded in making it and it works in .swf and tour_editor.html mode, it does not however work in html mode. the pano loads, and when you hover over the candle to click nothing happens, the cursor changes to a hand so it knows the hotspot is there... what could be the problem?

CLICK ON THE CANDLE

.swf version

html version

.xml

I use mac and firefox

Please help me figure this out.

Thanks
jaco

2

Dienstag, 21. Mai 2013, 11:39

Hi,

in HTML5 polygonal hotspots are not supported at the moment!
See here:
http://krpano.com/docu/html5/#supportedfunctionality

That means for html5 you would need to use directly the onclick event of the image hotspot instead of using the polygonal hotspot as hit-area.

e.g. simply add the here red-marked line - this will add an onclick event only for html5 for the spotNNN hotspot element:
<hotspot name="spotNNN" .... />
<hotspot name="spotNNN" onclick="switch(alpha,0,1);" devices="html5" />
<hotspot name="hs1" onclick="switch(hotspot[spotNNN].alpha,0,1)" ... />


Best regards,
Klaus

3

Dienstag, 21. Mai 2013, 13:17

Hi Klaus

Thanks for the reply, it works.

However no when i click it moves the image i used the same

onloaded="calc_pos_from_hfov_yaw_pitch_roll(11, -68.5993, 29.0215, -24.4857);" as the original hotspot, can this be made to not move too?

And also for some reason the html file does not open in google chrome, it reads an error but in firefox and safari its ok.


Also, is it possible to do this in panotour pro too?
Thanks
Jacob
»jacobus182« hat folgendes Bild angehängt:
  • Screen Shot 2013-05-21 at 12.02.48.png.jpg

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »jacobus182« (21. Mai 2013, 13:35)


4

Dienstag, 21. Mai 2013, 13:46

Hi,

However no when i click it moves the image i used the same

onloaded="calc_pos_from_hfov_yaw_pitch_roll(11, -68.5993, 29.0215, -24.4857);" as the original hotspot, can this be made to not move too?
Sorry, but I don't understand what you mean...

And also for some reason the html file does not open in google chrome, it reads an error but in firefox and safari its ok.
Chrome and IE10 don't allow loading local xml files in html5.
Try using the krpano Testing Server for local testing:
New Tool: krpano Testing Server

Best regards,
Klaus

5

Dienstag, 21. Mai 2013, 13:54

What I mean is on the original pano, when I click its pixel perfect because I uses your method of ptgui in the pool tutorial.

When I add that line you wrote in red it loads in HTML but the image is not aligned anymore. It shifts a couple of pixels, enough to notice

6

Dienstag, 21. Mai 2013, 14:12

Hi,

the link adds only a click event, it can't move the image...

In which browser do you see an image shift?
The link itself seems to be not updated, or?

Best regards,
Klaus

7

Dienstag, 21. Mai 2013, 14:41

That is the weirdest thing

I tested it locally on firefox and the image moves.

I have now replaced the xml online and its perfect. I also just tested it on safari locally and its fine aswell.

Sorry, i should have tested the published version too.

I made a video on my phone to show how the image shifted on firefox locally.
Firefox image shift
All is good now.
Thanks Klaus

8

Dienstag, 21. Mai 2013, 15:01

Hi,

okay, this is a known Firefox CSS3D issue - on some devices Firefox renders CSS3D inaccurately and on some others not. I don't know the exact reason, but a workaround doesn't seems to be possible - I know that problem since a long time and tried several ways to workaround it, but in the end, this is a bug that need to be fixed by the Firefox developers.

Best regards,
Klaus

9

Dienstag, 21. Mai 2013, 15:51

Ok thanks

Good to know.