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.

1

Friday, February 24th 2017, 10:45am

[Solved] Assign action with long-press touch (same as context menu) where is the code ?

Hi,

I want to assign a custom action with a long press on mobile/tablet,
I saw the context menu example but did not found the code snippet,

Thanks to point me in the right direction :-)

Z

This post has been edited 2 times, last edit by "zadda" (Mar 3rd 2017, 2:45pm)


spacerywirtualne

Professional

Posts: 891

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Friday, February 24th 2017, 2:56pm

Hi

Maybe something like this?

Source code

1
2
3
4
5
6
7
8
9
10
<events name="lmd" keep="true" onmousedown="mouse_long_touch(true)" onmouseup="mouse_long_touch(false)" />      
<action name="mouse_long_touch" protect="true">
        if(%1,
          delayedcall(delaytimeinsec, 2,
            <!-- you code here -->
          );
        ,
          stopdelayedcall(delaytimeinsec);
        );      
</action>



Best regards

Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

3

Friday, February 24th 2017, 7:28pm

Thanks a lot,
It works fine, you save my day *thumbup*

Z

spacerywirtualne

Professional

Posts: 891

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

4

Saturday, February 25th 2017, 12:07pm

Thanks a lot,
It works fine, you save my day

Z
*thumbup*


Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*