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.

  • "info@totzek.de" started this thread

Posts: 94

Location: Berlin

Occupation: Panoramafotograf

  • Send private message

1

Wednesday, May 2nd 2012, 5:17pm

hotspot onclick delay possible?

hi there,

i am working on a vr-project with some big hotspots. these hotspots will open panos onclick.
because the user should not open a pano by accident, i would like to add a kind of delay to the onclick function.

my idea:
when the user navigates through the pano and clicks and drags through it, the onclick function only works after x seconds of hovering a hotspot.
so the user must hover for x seconds and then click to open a pano.

is there a smart solution to it?
maybe something with an interrupted delayedcall or something?

cheers,
jan
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de

This post has been edited 2 times, last edit by "info@totzek.de" (May 3rd 2012, 10:22am)


2

Friday, May 4th 2012, 10:14pm

Hi,

you could try something like this:

Source code

1
2
onover="copy(t1,timertick);"
onclick="sub(overtime, timertick, t1); if(overtime GT 10, ...do here your onclick code...);"


in the first 'on over' of the element the current timetick will be stored in the 't1' variable,
and in the 'on click' the time that was elapsed since the first over will be calculated (just by: overtime = timertick - t1),
and when now the overtime is more than e.g. 10ms, then do the onclick code itself,

best regards,
Klaus

  • "info@totzek.de" started this thread

Posts: 94

Location: Berlin

Occupation: Panoramafotograf

  • Send private message

3

Friday, May 11th 2012, 5:57pm

Hallo Klaus,
danke Dir für den Code. Probiere ich gleich aus!
- Jan
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de