Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a better solution than setInterval #4

Open
nickdesaulniers opened this issue Jun 25, 2013 · 1 comment
Open

Find a better solution than setInterval #4

nickdesaulniers opened this issue Jun 25, 2013 · 1 comment

Comments

@nickdesaulniers
Copy link
Member

the setInterval code is brittle and really needs to go. Find a way to resize without having this code run 5 times a second when it's only needed once (after an event perhaps).

@RoboTeddy
Copy link
Contributor

Grumble, my Comcast connection died. On phone. Was rushing to get map working before Caltrain, hence setInterval.

At first was relying on window resize and document ready events, but a purely event-based approach would probably requiring finding an event/callback for Bootstrap's navigation bar toggle completion. I'm sure there is one-- would google for it if had Internet.

Sidenote: although ugly, the setInterval in this case is probably pretty reliable and won't cause performance problems in practice (it's a cheap idempotent call). But I wouldn't complain to see it gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants