You are not logged in.

1

Wednesday, July 31st 2013, 11:20pm

Open popup image from hotspot and resize it to browser height

Hi, how I can open popup image from hotspot, and resize it to browser height?

Thanks.

2

Wednesday, July 31st 2013, 11:38pm

I have find this, but how i can add a tween for to open image from small to big?

Source code

1
<layer name="popupimage" url="images/quadro1.jpg" align="center" height="80%" width="prop" visible="false" onclick="set(visible,false);" />		<hotspot name="quadro1" url="images/spot.png" ath="164" atv="5" onclick="set(layer[popupimage].visible,true);" />




How i can set the max height or width as the size of browser?

Thanks.

3

Thursday, August 1st 2013, 2:39pm

Any idea?

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

4

Thursday, August 1st 2013, 10:50pm

Example for you: link
Code: link

5

Tuesday, October 15th 2013, 11:33pm

Example for you: link
Code: link


I have try, but if i use the 3th button is ok only if the browser have the same ratio of the image, if you open a landscape image in a portrait browser, the image is distorted.

How can I enlarge respecting the proportions and the short side of the browser as maximum size?
Thanks.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

6

Wednesday, October 16th 2013, 12:56am

Try investigating this code from this example: http://krpano.com/examples/116/examples/…pe/fovtype.html
Adapting this code from Klaus you can achieve what you want. [url]http://krpano.com/examples/116/examples/xml-usage/fovtype/fovtype.xml[/url]

In general, this is base idea that works. You have to read your image dimensions and use it as parameter....

This post has been edited 1 times, last edit by "Umalo" (Oct 17th 2013, 1:55am)


tonesh

Trainee

Posts: 75

Location: Rome

Occupation: Photographer

  • Send private message

7

Wednesday, October 16th 2013, 11:28pm

Simply add to Umalo's code

height="100%" - width="prop"

Toni

8

Thursday, October 17th 2013, 12:45am

Simply add to Umalo's code

height="100%" - width="prop"

Toni


Witht this method, if i see my image in the desktop is ok, but i i see the image in the smartphone, where the ratio of the monitor is inverse, it exit from my screen.

I need a method where the longest side, x or y is the guide for the resize.

I hope I explained myself better
Thanks.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

9

Thursday, October 17th 2013, 2:03am

I will not give you an answer immediately. Want to motive you to come up with your own solution. Read your last post. There are several good points (one good IF) there which are important.
-Hints: Screen ratio, Image ratio. Put some random resolutions on paper and think how to decide e.g. when your area is in portrait and when in landscape (one line of code but...no yet, we need to see you think and try).
It is actually pretty simple math to find them out and than you know what to do... set this or that to 100% or less and other to PROP. (Toni was partially right)

10

Thursday, October 17th 2013, 11:36am

Hi, thanks, but i don't know how to code my idea for krpano.
Yes, is a set of if, that may be some like:

if (browser width is greater that height) width="prop" height="80%"
if (browser width is less that height) width="80%" height="prop"

but this is for landscape imge, if i apply this code to a portrait image my be that it go out of the screen, and i think that i need too a code for to understand if the image in landscape o portrait oriented.

..but i don't know ho to do.

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

11

Thursday, October 17th 2013, 12:27pm

ok, now you are talking. Good one *thumbup* . Here are more hints:
- http://krpano.com/docu/xml/#plugin.imagewidth
- http://krpano.com/docu/actions/#stagewidth