You are not logged in.

1

Thursday, April 19th 2012, 12:04pm

Hotspots disappears after set URL (URGENT!)

Hi Klaus,

on the iphone/ipad hotspots disappears when using the following:
<style name="hotspot"
...
...
onloaded="hs_change(get(name))"
/>

<action name="hs_change"
set(hotspot[%1].url,img2.png);
</action>


On the desktop this works perfect! Why not on iphone/ipad? I don´t even get a error.

Thanks a lot in advance *attention*
Nupsi

Tuur

Sage

Posts: 3,124

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Thursday, April 19th 2012, 12:16pm

Are you shure it is exactely the same on desktop?

As far as i know you can't manipulate style tag's...
But when this works on desktop... That's nice...

Then you should expect that it also works on ipad etc..

Like an answere aswell

Cheers
Tuur
http://www.virtualtuur.com
Skype:studiotuur

3

Thursday, April 19th 2012, 1:25pm

Hi,

the code itself looks okay and should work...
is the krpano version up-to-date?
or can you post a link?

As far as i know you can't manipulate style tag's...
partially right - modifying a style is possible, but that doesn't mean the other elements that had used that style, will be updated too - the style will be only applied on creating or when calling the loadstyle() function,

beside of that - this code isn't modifying the style

best regards,
Klaus

4

Thursday, April 19th 2012, 1:39pm

Hi guys,

thx for reply! Version is the latest, Klaus. And sorry, no link yet :(
But it´s getting even worse than the disappearing! If I set a delay like this:
delayedcall(10,set(hotspot[%1].url,img2.png));
then the hotspot-image get changed BUT the hotspot no longer stays at it´s position *blink* When the autorotation hits the hotspot and the hotspot should go out of the display, it sticks to the left frameborder and follows the autorotation *wacko*

I´ll try to build a quick preview, Klaus! But maybe you have an idea what this could be?

EDIT: I just send you a mail with a little preview, Klaus!

Best regards
Nupsi

This post has been edited 1 times, last edit by "Nupsi" (Apr 19th 2012, 1:56pm)


5

Thursday, April 19th 2012, 1:56pm

Hi,

no, sorry, absolutely no idea...
have you checked the browsers error console? any errors there?

best regards,
Klaus

6

Tuesday, April 24th 2012, 2:55pm

Hi,

this problem is fixed in this new version:
1.0.8.15 pre-release

best regards,
Klaus

Jonnie

Beginner

Posts: 37

Location: Denmark

Occupation: ex Software Architect 20 years (Aerospace Industry), then hotel owner now campground owner, I do some IT consultancy

  • Send private message

7

Friday, May 11th 2012, 10:05pm

RE: Hotspots disappears after set URL (URGENT!)

Hi Klaus,

I read Nupsi's bug report.

I think I may have a related problem.

I took your standard thumbs code and added an extra plugin - this is simply to contain a graphic that says "click here to change scene", so I modified the actions buildthumbs, closethumbs and openthumbs in a fairly straightforward way.

the openthumbs and closethumbs functions merely get an extra line to turn off or turn on the visibility of the "click here to change scene" graphic, I dont want it displayed when the thumbs are open.

I am setting the url for the "click here" plugin using a style because I am working with six languages and hence six different graphics, one for each language - the outer xml wrapper is language specific and sets style urls for language dependent graphics.

The issue is that on ipad the "click here" graphic disapears completely after I have changed scene - the thumbs close as expected but the "click here" fails to re-appear
when its visibility field is set true by closethumbs.

I then experimented and changed the code in open / closethumbs to change the alpha of my "click here" plugin to 0.0 or 1.0 instead of using the visibilty option.
The behaviour is then that the "click here" does appear after a scene change but when I rotate the ipad it can get 'stuck' - for instance if I rotate from landscape
to portrait then the thumbs all correctly drop down to the bottom right corner but the "click here" remains higher up the screen at a position that corresponds
to its pixel height from the top of the screen when it appeared in landscape mode, it has not been correctly re-located to the bottom right after a screen rotation.

I am using the following code to set the url of the "click here" plugin....

<style name="changescenetip" url="pano_skin_guldager/change_scene_en.png" /> ( this is from the outer language specific xml wrapper - English in this case ).

I am using the following to set the url of my "click here" plugin within the build thumbs code.

addplugin(changescenetip);
plugin[changescenetip].loadstyle(changescenetip);

The rest of my additional code for the "click here" plugin is derived from the original thumbs code, for instance I have set the keep field true.

The interesting thing is that if I hard code the url instead of using the dynamic load style then all problems go away.

set(plugin[changescenetip].url, 'vtour/pano_skin_guldager/change_scene_en.png' );

I read your comments about a fix in the latest beta version but it seems there were some problems reported by others and I dont want to go off in that direction
just yet, Iam very close to a lot of client work and I dont want to make unnecessay changes at this crucial time without good reason.

Naturally I can create a cut down simplified version although this would be quite a lot of work so in the first instance I would like to ask whether you believe this
could be related to the problem that Nupsie reported?

Recap:

Ipad specific - no problems on desktop or android.
Simple extra plugin added to standard "thumbs" code - just an instructional graphic.
graphic url set by dynamic loading of a style.
plugin does not re-adjust position correctly when ipad is rotated.
It is desired that this plugin is not seen when thumbs expanded - if visible field is used then the graphic does not reappear when close_thumbs sets the field
true - however if the alpha field is used instead of the visibility field then when close_thumbs sets alpha 1.0 the graphic does re-appear.
The alpha method represents an acceptable workaround except for the additional problem of incorrect positioning after ipad is rotated.

I would value even a guess as to whether this is the same problem as Nupsies - If I know its probably not an issue in my code then would prefer to think
about workarounds, I dont want to ship beta code at this late stage to my clients.

If its not related to Nupsies problem then I know its worth spending more hours closely scruitinising my code.

Thanks
Jon

Ammendment after initial posting - I misread Nupsie - he was talking of autorotation - whereas I am refering to ipad rotation ( portrait / landscape ) - sorry, probably less reason to suppose its related to Nupsies problem than I first thought.

8

Saturday, May 12th 2012, 10:17am

Hi,
I read your comments about a fix in the latest beta version but it seems there were some problems reported by others and I dont want to go off in that direction just yet, Iam very close to a lot of client work and I dont want to make unnecessay changes at this crucial time without good reason.
btw - testing the pre-release version isn't a big thing... just replace the viewer files...

and what problems from the 1.0.8.15 pre-release do you mean?
the 'hotspot performance report' from Hans?
that's already fixed...


plugin does not re-adjust position correctly when ipad is rotated.
The alpha method represents an acceptable workaround except for the additional problem of incorrect positioning after ipad is rotated.

sorry, but I don't know what kind of problem you mean... the ipad rotating and plugin positioning should normally work in every case... and 'alpha-workaround' sounds really strange...
do you have an example for the problem?

but if it's about loadstyle() usage in HTML5 then I would really recommend using the last 1.0.8.15 pre-release version!

best regards,
Klaus