You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, July 2nd 2013, 11:33pm

hotspot scale ... html5 VS flash

Hi

I do not know if it is only me or the look of the hotspots on HTML5 is way bigger than flash ... i am using the latest versions of players & scripts
is there a way to control this?

Thanks,
Rares

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Thursday, July 4th 2013, 11:14am

Try scaling differently on device bases: E.g.:

Source code

1
<plugin name="grb_osijek" url="%SWFPATH%/images/grb_osijek.png" align="lefttop" keep="true" alpha="1" scale="1" handcursor="false" visible="false" x="10" y="10" zorder="9" onhover="" onclick=""/><krpano devices="mobile"><plugin name="grb_osijek" scale="0.5"/></krpano><krpano devices="html5"><plugin name="grb_osijek" scale="0.7"/></krpano>


See devices here: link

3

Thursday, July 4th 2013, 11:40am

thanks for you advice :)

i thought there is a hotspot property that controls this without duplicating the hotspot ... there are tours where i have 100 hotspots ... i wouldn't want to make 2-300 :)

Rares

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

4

Thursday, July 4th 2013, 1:46pm

It is duplication of hotspots. It is redefinition of scale property based on device type.
Even so, this can be significant code behind.

Think about usage of onloaded attribute.
E.g. define your hotspot style and put something like this there:

Source code

1
onloaded="if(device.desktop,set(scale,0.1);if(device.html5,set(scale,0.5);"

5

Thursday, July 4th 2013, 1:51pm

Hi,

I would say there must be something wrong in the xml itself, because normally all sizes should be the same in Flash and HTML5...

Best regards,
Klaus

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

6

Thursday, July 4th 2013, 1:58pm

I can see the chance people think their hotspots/plugins are to big on e.g. Ipad. As they have huge native desktop resolutions where all work is prepared and than when testing on real devices which have lower resolutions it might be the case of relative size looks bigger. This happens to me when both new monitor with huge resolution *huh*

7

Thursday, July 4th 2013, 2:04pm

For such situation using a <style> with different devices settings might be the easiest solutions,
e.g.

Source code

1
2
3
<style name="hotspotstyle" .... scale="1.0" devices="desktop" />
<style name="hotspotstyle" .... scale="0.5" devices="tablet" />
<style name="hotspotstyle" .... scale="0.5" devices="mobile" />

and:

Source code

1
2
3
4
<hotspot name="spot1" ... style="hotspotstyle" ... />
<hotspot name="spot2" ... style="hotspotstyle" ... />
<hotspot name="spot3" ... style="hotspotstyle" ... />
...

Best regards,
Klaus

8

Thursday, July 4th 2013, 6:06pm

Hi guys,

Thanks for all your input ... i think that klaus is right about using dedicated styles for each device

maybe it is important to say that this change appeared when i upgraded the viewer to 1.16.4
this is the tour => http://www.360tourist.net/view-tour/3132
this is the xml => http://www.360tourist.net/read-tour/3132

i honestly do not understand how can this be an xml issue :(

thanks,
Rares

9

Thursday, July 4th 2013, 6:45pm

Quoted

i honestly do not understand how can this be an xml issue :(
But it's one ;-)

The link to the pano doesn't work, but the xml one and there I found this hotspot xml code:

Source code

1
<hotspot ... altscale="1" ... scale="0.3" ... />


See here:
http://krpano.com/docu/xml/#hotspot.scale
http://krpano.com/docu/xml/?version=10814#hotspot.altscale

With 'altscale' an 'alternative scaling' for HTML5 will be defined and this overrules the normal scale setting, so in HTML5 the scaling is 1.0 and on Flash its 0.3.

Best regards,
Klaus

10

Thursday, July 4th 2013, 6:51pm

Awesome :)

see ... we learned something today :P

Thanks,
Klaus :)