You are not logged in.

Kev-in-spain

Intermediate

  • "Kev-in-spain" started this thread

Posts: 152

Location: Barcelona

Occupation: VR Photographer

  • Send private message

1

Thursday, February 23rd 2012, 9:49am

plugin scaling or fix aspect.

Hi all,
Can anyone tell me how to scale plugins and keep their position fixed in proportion to screen/window size?
Here is the relevant tour : http://www.360examples.net/mijas_30/tour.html
I need the plugins at the bottom left to scale down if viewed on a smaller screen. For instance, if viewed on an ipad in portrait, they bleed over the nav buttons.
I have the same issue with the thumbs at the top of the screen.

As always, I'm very grateful for any suggestions.

Kev

2

Monday, February 27th 2012, 4:24pm

Hi,

there are several solutions possible:

1. either use percent sizes and positions,

2. or set the size depending the on the device, e.g.

Source code

1
<plugin .... onloaded="if(ismobile, set(scale,0.5);mul(x,0.5);mul(y,0.5); );"  ... />


3. or use addtional xml tags with the devices setting:

Source code

1
2
<plugin name="button1" ... x="..." y="..." />
<plugin name="button1" devices="mobile" x="..." y="..." scale="0.5" />


see also here:
http://krpano.com/docu/xml/#devices-notes
http://krpano.com/docu/actions/#isphone

best regards,
Klaus

Kev-in-spain

Intermediate

  • "Kev-in-spain" started this thread

Posts: 152

Location: Barcelona

Occupation: VR Photographer

  • Send private message

3

Tuesday, February 28th 2012, 9:12pm

% works for me.

Thanks Klaus,
The % position works for me.
I had already tried % size but, of course, as the screen became smaller, the plugins maintained their x & y positions and moved further apart. I didn't think about applying % to position also *wacko*
I would like to do the same with the buttons and the thumbs... where in the code would I need to apply the percentage?