Idletime handling (possible bug)

  • Hi guys.

    I play around with idletime and found out strange behavbiour. If you interupt idletime with e.g. Mouse click and move over pano than is is like reseted and starting to count user inactivity from 0 (or other way around depends how the counter works).
    But if you just click this is not counted as user action -> which is strange. Is this a bug or I am doing soemthing wrong.

    Example:


    showlog();
    set(autorotate.enabled,true);
    set(step,1);
    </action>


    set(autorotate.enabled,true);
    if(step == 5, set(step,1));
    if(step == 1, trace(step));
    if(step == 2, trace(step));
    if(step == 3, trace(step));
    if(step == 4, trace(step));
    inc(step);
    set(idletime, 3);
    </action>


    onclick="action(reset_idle); set(autorotate.enabled,false); "
    onmousedown="action(reset_idle); set(autorotate.enabled,false);"
    />


    showtext(Idle time reset));
    </action>

    waittime="0"
    speed="2"
    />
    </autorotate>


    When you click and move on pano it works perfercty. My counter is increasing and dispaying number 1, 2, 3, 4 if interwals are min 3 sec of user inactivity.
    But when you just click or mouse down nothing happened (without movement with mouse). Tried with onclick and mouse down.

    Is there a way to see the internal idletime variable that counts for inactivity to debag what is wrong. Or to force reset of this variable manualy.
    Thanks in advance

  • Nope, there is nothing wrong. krpano just don´t interrupt the idle time with a single mouse click, which I find a little annoying too. You have to write your own little script to implement a feature like that.

    Best regards
    Nupsi

  • So, is there a way to see the value of some internal variable/counter where idle time is counted to compare it manually or set it to 0 in case mouse down.

    P.S. Should't mouse click be user interaction? *whistling* Also definition of idletime in documentation say:
    " The time in seconds without any user interaction before calling the idle event. "
    So, why then mouse click is treated as NO user interaction? Looks strange to me.

  • Hi,

    So, is there a way to see the value of some internal variable/counter where idle time is counted to compare it manually or set it to 0 in case mouse down.

    no, but there is a way to reset the counter by using the invalidatescreen() action:

    https://krpano.com/docu/actions/#invalidatescreen


    Zitat

    P.S. Should't mouse click be user interaction? *whistling* Also definition of idletime in documentation say:
    " The time in seconds without any user interaction before calling the idle event. "
    So, why then mouse click is treated as NO user interaction? Looks strange to me.

    good point, at the moment the user needs to interact with the pano, e.g. pan or zoom it a bit,
    changing that would be possible of course, but I'm not sure now if that would be okay for all other situations...

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!