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

Thursday, May 31st 2012, 10:41pm

enlarging hotspots when zooming

A client has asked me if it is possible to make hotspots 'grow' in size when someone zooms in, in otherwords the buttons (hotspots) must scale along with the zoom.
thanks in advance.
Best regards
Tim

Tuur

Sage

Posts: 3,733

Location: Netherlands

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

  • Send private message

2

Thursday, May 31st 2012, 10:56pm

yes that's possible

zoom="true"

Hope it helps

Tuur *thumbsup*

3

Thursday, May 31st 2012, 11:12pm

enlarging hotspots (and plugins) when zooming

Thanks Tuur,
Just tried it and works fine on my hotspot arrows, the issue I now have is with my plugins, ie buttons for zoom in/out, rotate, fullscreen etc
as they are plugins I cannot use zoom=true (I tried). Is there a way to turn these plugins into hotspots? so I can then use zoom="true"
the only difference for me is that the plugins are defined relative to the screen, ie dont move with when the pano moves, whereas the hotspots are defined relative to the pano.
cheers
Tim

4

Friday, June 8th 2012, 9:04am

enlarging plugins when zooming

Still have the issue with plugins, ie buttons for zoom in/out, rotate, fullscreen etc is there any way to make the get larger when zooming, similar to how you can do with hotspots?


ideas appreciated!
Tim

5

Thursday, June 14th 2012, 10:21am

Hi,

you want the buttons (the user interface) to zoom when zooming in the pano?
that doesn't make sense, or?

but anyway - if you want - it would be possible of course:

the fov can be recalculated to a scaling factor and then this scaling factor be applied to the buttons that should zoom,
e.g.:

Source code

1
2
3
4
5
6
7
8
9
10
11
<events onviewchanged="zoombuttons();" />

<action name="zoombuttons">
  div(tmp, view.fov, 360);
  mul(tmp, 3.14159);
  Math.tan(tmp);
  div(scale, 1, tmp);
  copy(plugin[button1].scale, scale);
  copy(plugin[button2].scale, scale);
   ...
</action>


best regards,
Klaus

6

Saturday, June 30th 2012, 5:32pm

enlarging hotspots when zooming

Thanks Klaus



I will try this out.



I agree a bit of a weird requirement. Its to do with accessibility standards, Apple gets around it nicely as you can do 'three finger' zoom which enlarges the viewing area and everything gets scaled.



Cheers

Tim