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

  • 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

  • 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

  • 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

    Edited once, last by Nupsi (April 19, 2012 at 1:56 PM).

  • 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.

  • 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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!