-
Notifications
You must be signed in to change notification settings - Fork 0
#32 slider widget fails #33
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
Conversation
… render slider widget in Chrome on Windows
…dgets are not loading from shortened URL links
…d Chrome loading glitch on Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the slider widget failure by introducing a timeout before layer activation to ensure that parent elements exist.
- Adds a 200ms timeout in state.js to delay layer activation.
- Improves error handling in models.js with extra conditions and a simplified slider redraw call.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| visualize/static/js/state.js | Wraps layer activation in a setTimeout to fix widget initialization. |
| visualize/static/js/models.js | Adds an extra condition to avoid errors and simplifies slider redraw logic. |
… would likely fail for hashes with multiple layers
…drawSlider to maintain execution context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes timing issues when restoring layers from the URL hash by delaying slider initialization, and tightens lookup guards and event binding logic in the layer model.
- Adds a 200 ms timeout before activating hash state layers to ensure DOM readiness.
- Adds an existence check for multilayerValueLookup entries and refactors slider callbacks.
- Adjusts the animate-slider event binding condition to only bind once.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| visualize/static/js/state.js | Wraps activateHashStateLayers loop in a 200 ms setTimeout. |
| visualize/static/js/models.js | Guards against undefined lookup, binds drawSlider, updates .length check. |
Copilot caught my off-by-one error. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes #32 -- adds a timeout before loading layers from hash. For Chrome on Windows, this was trying to build slider widgets before the parent elements were created.