7yl4r / the-oregon-trajectory

:rocket: The Oregon Trail -- in SPAAACE!
http://7yl4r.github.io/the-oregon-trajectory/
GNU Affero General Public License v3.0
17 stars 6 forks source link

travelscreen ui does not update while traveling #39

Closed 7yl4r closed 9 years ago

7yl4r commented 9 years ago

auto-travel (6ea1c9442d2288b4117092a1681b668baac0abbe) is for some reason preventing the ui display from updating. In theory, things should be the same as before, but apparently angular handles things triggered by ng-hold differently than changes triggered by setTimeout. Hopefully there is some way to force angular to update values.

BrianErikson commented 9 years ago

@7yl4r, check out $interval. I'm still learning how to implement stuff in angular, but it looks promising for this use-case.

7yl4r commented 9 years ago

nice. that was a lot easier than I expected.

BrianErikson commented 9 years ago

Yeah I was actually pleasantly surprised that it almost replaced setTimeout one-to-one. Just note that a cancel is always needed to avoid memory leaks :fearful: