On Jul 21, 10:28 pm, netski <[email protected]> wrote:
>
> Scenario: when someone drags from one edge of the screen to the other,
> which fires 300 move events, after the first move event is executed I
> check a condition. If the condition is not met then I would like to
> cancel the other 299 move events that are called.

You could test for a flag variable at each move event: if the flag is
false, don't do anything. That would be fairly inexpensive. If the
flag is true, test your condition and act on it. If the condition
fails, set the flag to false so that future move events are
inexpensive. On a moveend event, set the flag to true so that the real
condition is tested next time round.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to