You are not logged in.

1

Tuesday, August 31st 2010, 12:58am

action to change the hfov of image xml parametre by clik

Hello i want to enable an specific view on picture :
I want that at the beginning we can see the full view of the pano hfov: 180 in image, and after the first click i want to change the view change and be like the view we get with hfov set to 80.

Is it possible by an action ton change this setting ??

2

Tuesday, August 31st 2010, 3:22am

Try <events onclick="set(image.fov,80)" /> or something like it.

3

Tuesday, August 31st 2010, 10:00am

I have try and i try again after your answer but is not working :

<item name="item2"
caption="About the Photographer..."
onclick="set(image.hfov,180);"
/>

I have one other solution is to make one xml with the full parameter of panorama 1 and hfov="80" and on other with full parameter of the same pano but with hfov="130" , the second is load on clik of a hotspot with is the full first panorama.
But did you have sometime more easy ??

This post has been edited 1 times, last edit by "toutcoolpedro" (Aug 31st 2010, 2:43pm)


4

Friday, September 3rd 2010, 1:02pm

Hi,

the image hfov and vfov values are static and can't be changed dynamically,
you would need to call - reloadpano() - then the pano will be reloaded and the new image settings will be used,

best regards,
Klaus

5

Friday, September 10th 2010, 10:56am

Thanks for you answer , but i don't understand tow points :



-How can i create an action witch is load when I'm zooming on and out from a point ?

-Who is the syntax to change the hfov with an reloadpano() , where did i past the new parameter ?



Thanks !

6

Friday, September 10th 2010, 3:12pm

I think klaus means you change the hfov and vfov variables first, and THEN you use reloadpano(); this should force the image to acknowledge the new values.

To detect when you're zooming in and out you could detect the keys and buttons that make you zoom in and out, such as ctrl, shift or the mouse wheel:

<events onmousewheel="..." />

Just an idea.

7

Friday, September 10th 2010, 6:33pm

I'm a bit stupid but i still don't understand where i past the variable for the new hfov ?
Can you teach me ?
Sorry but i can make an action but how can i change the parameter like hfov witch are static, because if i reload the pano, the xml will be still the same with hfov=10 at the beginning !!??

Thanks for your help !!

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

8

Friday, September 10th 2010, 7:45pm

Hi toutcoolpedro,

Quoted

I'm a bit stupid but......
Tout Cooool Pedro *g* ;-) .....

Quoted

Sorry but i can make an action but how can i change the parameter like hfov witch are static, because if i reload the pano, the xml will be still the same with hfov=10 at the beginning !!??
The reloadpano() action does not reloads the original xml but the one allready in memory (with the changes mades dynamically)...
So, a possible code could be:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
	<item name="item2"
		caption="About the Photographer..."
		onclick="set_hfov(180);"
		/>
	
	<action name="set_hfov">
		showlog(); <!-- testing purpose -->
		trace('image.hfov = ',image.hfov); <!-- testing purpose -->
		set(image.hfov,%1);
		reloadpano();
		trace('image.hfov = ',image.hfov); <!-- testing purpose -->
	</action>

But note: normally, when setting an hfov inside the image node, the vfov it is calculated automatically... but it seems that it is not the case when the hfov is changed dynamically... so, you have to set the vfov dynamically also...

Hope this help...

KLAUS,
The reloadpano() action is missing inside the [b]Quick Reference[/b] *rolleyes* ...

SAlut.

9

Friday, September 10th 2010, 9:14pm

Thanks a lot Michel, i will try !!