-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/scenario settings #61
Conversation
Sliders are adjusted for scenario settings. First the detail sliders are updated and then DETAIL_PANEL_SLIDER_CHANGE is changed to adapt main sliders. And after that the main/panel Sliders are updated with the scenario settings, but somehow the max value of the sliders (in the inside logic) is not changed, so the scenario setting can not move the slider beyond the "old" max value. And I don't know why. |
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.
I really like your implementation!
I did two modifications:
- only read scenario.json once at beginning of module
- moved adapting of scenario sliders into scenario.js
Thanks for this!
BTW, I did not change anything but moved adapting to scenarios.js - but somehow main slider adaption works now. |
@nesnoj could you check if this works as expected on your machine too? Thx |
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.
Thx, will check!
One thing I just noticed: The detail settings sidepanels do not close when clicking [X], console saying "closeSidepanel is not defined at HTMLButtonElement.onclick".
I guess after changing the script type of the sliders.js
to "module" the ex- and import of this fct should be added? (adding export ...
did not help)
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.
Works out as expected, thank you @josihoppe and @henhuy !
I'd have liked to have it implemented more generically (scenario site template which is filled with data from json or whatever) but to wrap up this quickly, this solution is good as it implements the most important features!
2 things:
- Please fix the detail panel bug described above (BTW, the closing via more arrow btns work, as this is implemented using
eventTopics.MORE_LABEL_CLICK
) - I'd like to change the path to
scenarios.json
to the digipipe datapackage later, can I just change the path? The path toscenarios.json
is hard coded in JS - if the file were taken from datapackage, should it be added to theconfig.py
instead like the other panel settings files?
I also recommend to read path from config file. |
will fix |
Could you please change this @josihoppe ? |
I will do |
Implemented change requests. Please review and merge |
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.
LGTM!
No description provided.