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

Added showSingleHandle option to timeline widget #620

Closed
wants to merge 8 commits into from
Closed

Added showSingleHandle option to timeline widget #620

wants to merge 8 commits into from

Conversation

roikle
Copy link

@roikle roikle commented Feb 2, 2017

Provided an option to replace the dual handle timeline slider. By default the this new option is set to false but if the showSingleHandle option is set to true in the timeline widget, the dual handle slider will be replaced with a single handle.

A timeline with a single time-slider handle will initially have a interval set to the minimum range, allowing the user to move the handle to expose more items on the map, as you move through the time range.

This addresses issue #601

@roikle roikle added the Enhancement Desired improvement to design or implementation that adds value. label Feb 2, 2017
@roikle roikle added this to the 2.2.9 milestone Feb 2, 2017
@jpfiset
Copy link
Collaborator

jpfiset commented Feb 13, 2017

Rob, I have a couple of questions:

  1. Why is there a change in the background colour in CSS? This seems out of scope of this enhancement.

  2. I am not sure I understand the necessity of the code from line 246 to line 256, where the dispatcher is given an event in the case of a single handle widget.

  3. In line 258, the logic could assign a class to the slider (something like n2timeline_slider_left_slider_hidden) and the slider hidden in CSS. Not sure which is best.

@roikle
Copy link
Author

roikle commented Feb 13, 2017

HI JP, thanks for the questions,

  1. The CSS change was purely aesthetic and is not used in this enhancement. Feel free to exclude it if you prefer the old style rule.
  2. This was my attempt to use the model to decide the initial position of the upper-range handle. I have to admit I'm not sure if this is the best approach for performing this task, and would appreciate any advice you have to improve it's design.
  3. I agree with your suggested change, and have made the update.

Thank you for your help.

@roikle
Copy link
Author

roikle commented Feb 16, 2017

I've removed the css colour change from the n2timeline_slider. Upon reflection, I think it looks better the old way.

@roikle roikle closed this Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Desired improvement to design or implementation that adds value.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants