Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

360boy

Fortgeschrittener

  • »360boy« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

1

Samstag, 22. Juni 2013, 05:36

ONDOWN vs ONCLICK some confusion here

Hello folks, I've had this doubt for a while, ¿can anybody explain me what is the difference between using the ONDOWN event and the ONCLICK event?

Documentation states this:

ONCLICK : Actions / functions that will be called when there is a mouse click on the layer/plugin element.
ONDOWN: Actions / functions that will be called when the mouse button will be pressed down on the layer/plugin element.

I can't figure out what's the difference between a mouse click and a mouse button pressed down, ¿does it means ONDOWN element extends click for every mouse's button?

Klaus, if you read me, I'll sugest you to clarify better the difference in the documentation, I find it confusing.

Thanks in advance

Luis

2

Montag, 24. Juni 2013, 09:25

Hi,

the ondown-event does not need the release (onup) of the mouse-button to work. This means you can use the ondown for usefull things like checking if the mouse button is released (onup) at the same position or not to start different actions. I use the ondown and onup-event excessively and additional to the onclick-event in my tours. It´s a great-to-have-thing *smile*

LG
Nupsi

3

Montag, 24. Juni 2013, 14:51

Hi,

click = mouse-button-down (or touch-down) + (at least) no movement + mouse-button-up (or touch-release)

Just image that you can hold the mouse button down to do something, just with an onclick event alone this would be not possible - e.g. start something on the ondown event and do it as long until the onup event comes...

Best regards,
Klaus

360boy

Fortgeschrittener

  • »360boy« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

4

Dienstag, 25. Juni 2013, 22:14

Thanks for your very detailed explanations Klaus and Nupsi, I see clearly the difference now. *thumbup*

Click is considering the complete cycle DOWN + UP while ONDOWN just the first part of the click event.

Truly useful as you say Nupsi, it offers more control over the whole click event.

Best regards

Luis