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.

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,334

Location: Duluth MN

  • Send private message

1

Thursday, January 6th 2011, 8:15pm

ondown event needed.

ondown event.

using the vtour droplet in order to have the thunbs close auotmatically they are coded to an onclick event. viewing the thumbs on my iphone they never close since there is never an onclick event that happens. we need an ondown event to replace the onclick for touch devices.

EDIT: I just tested the onmousedown event and it does work. I did not think it would because it stated mouse. Maybe it is called onmousedown but the mouse part is not needed it works for touch also.

HansNyb

Professional

Posts: 852

Location: Denmark

Occupation: Photographer

  • Send private message

2

Friday, January 7th 2011, 2:51pm

But why do you not use ondown?

There is nothing anywhere saying that it does not work.
I used it since I started using the Vtour

http://www.360-foto.dk/tadashi/ipad/

The close and open thumbs is ondown. Loading panos from thumbs is ondown.
The map popup is onclick. All works perfect on iPad.
You can clearly feel the difference when you click the thumbs and close the map.

Hans

VN2009

Professional

  • "VN2009" started this thread

Posts: 1,334

Location: Duluth MN

  • Send private message

3

Friday, January 7th 2011, 4:14pm

yes i have used the ondown for hotspots and plugins. however i am talking about a global ondown event like seen here. i did not know about the onmousedown event it must be new. even though it says mouse it still works for touch so the event I was asking for is already available. in your tour you posted you have removed the closethumbs () that autocloses them with any click.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<events onxmlcomplete="IF(plugin[firstpano].firstpano == 1, groundspottags(););"
	        onpreviewcomplete=""
	        onloadcomplete="set(plugin[titletext].html, '[p]Downtown Duluth Aerial 360 [/p]'); set(plugin[scrolltextfield].html,data:b360);"
	        onloaderror="set(plugin[black].visible, true);"
	        onkeydown=""
	        onkeyup=""
                             onmousedown=""
	        onclick=""
	        onviewchange="maps_rot();"
	        onidle=""
	        onresize="" 
	        onenterfullscreen="set(plugin[openfs].visible,false); set(plugin[closefs].visible,true);"
	        onexitfullscreen ="set(plugin[openfs].visible,true);  set(plugin[closefs].visible,false);" 
	        />


the vtour bat file uses the global onclick event to auto close the thumbs. it works no matter where on the screen you click. so for an touch device if you want the thumbs to close when the screen is touched you would chagne the onclicks in the red text below to onmousedown. otherwise they never close as there is never a click.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
	<action name="openthumbs">
		if(%1 != NEXT,
			set(i,0);
			set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );	
                                                                  );

		if(i LT scene.count,
			txtadd(thumbname,'thumb_',get(i));
			openthumb(get(thumbname));
			set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
			inc(i);
			openthumbs(NEXT);
		  );
	</action>

This post has been edited 1 times, last edit by "VN2009" (Jan 7th 2011, 7:16pm)


4

Friday, January 7th 2011, 9:41pm

Hi,

there is already a global "onmousedown" event:
http://krpano.com/docu/xml/#events.onmousedown

on the iPhone/iPad it will be called on a iOS "touchstart" (=finger down) event,

best regards,
Klaus