You are not logged in.

nosferatu

Trainee

  • "nosferatu" started this thread

Posts: 80

Location: Ukraine

  • Send private message

1

Thursday, April 16th 2015, 8:28am

Problem with autorotation and wait()

Hi Klaus!

I noticed when autorotation mode enabled and run the wait() action, the autorotation was suspended for a while and then continued rotation.
This stop takes 1 second if waittime=1
When using delayedcall() delay is not observed, but I need just wait() action.

Can you suggest something in this issue?

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Thursday, April 16th 2015, 4:30pm

That's what wait is designed to do.

"Wait a number of seconds or wait for an event.

Note - The user interface and all other actions are blocked during the waiting. That means the next action will be executed when the current action was done. The oninterrupt action can be used to make this action interrupt able by the user.
"

Perhaps you want to do something else that seems similar. Depending on what that is exactly, will determine the right method.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

nosferatu

Trainee

  • "nosferatu" started this thread

Posts: 80

Location: Ukraine

  • Send private message

3

Thursday, April 16th 2015, 7:04pm

Here is a sample of my code:

Source code

1
2
3
4
set(layer[hint].html, "");
wait(0.1);
set(layer[hint].html, %1);
set(layer[hint].visible, true); 

Use delayedcall(0,1, ...); different from the wait(0.1)
And gives unpredictable results for my purposes

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Thursday, April 16th 2015, 10:23pm

OK But why are you doing that? Clearing before you set it?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

nosferatu

Trainee

  • "nosferatu" started this thread

Posts: 80

Location: Ukraine

  • Send private message

5

Thursday, April 16th 2015, 11:18pm

Because in the text area displays the old text from the previous text prompts (lasting a very short time).
Apparently browser can not redraw so quickly.
By the way on slower machines it is more noticeable.

However, I already have some solutions.
When called text tip I use set(autorotate.waittime, 0);
And prescribe event - onmousedown="set(autorotate.waittime, 2)"; to restore waittime.

As a result, stop lasts: 0.1 + 0 = 0.1 sec instead of 0.1 + 2 = 2.1 sec

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

6

Friday, April 17th 2015, 1:31am

Why not?...


Quoted


set(layer[hint].alpha,0);
set(layer[hint].html, %1);
set(layer[hint].alpha,1);


Or put the set(layer[hint].alpha,1); into the onautosized event of the textfield?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour