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

Draggable toggle #706

Merged
merged 12 commits into from
Mar 3, 2014
Merged

Draggable toggle #706

merged 12 commits into from
Mar 3, 2014

Conversation

mlynch
Copy link
Contributor

@mlynch mlynch commented Mar 1, 2014

An implementation of a draggable toggle switch that behaves like iOS's. This means the bar doesn't move with the finger, but it does slide over when the drag hits a certain threshold.

One other interesting thing about the toggle is that it "tends toward" the initial state it was at before the drag started. So, if the switch was "on", the drag will need to go further in order to switch it "off", and vice versa. This is how the iOS 7 slider works.

A few more tasks:

  • stop scroll dragging when dragging toggle
  • Do we want to have a "hold" state like iOS 7?
    • I added a slight darkening to the toggle when holding. Thoughts?
    • Try graded browser styles
  • Test on Android
  • Check performance/DOM stuff. Check if should use requestAnimationFrame
  • Extend draggable area to make it easier to hit
  • Slow down the toggle animation speed
  • tap inputs test
  • Disable works

@adamdbradley adamdbradley modified the milestones: 0.10.0, 1.0 Beta Mar 3, 2014
@mlynch mlynch merged this pull request into master Mar 3, 2014
@mlynch mlynch deleted the wip-draggable-toggle branch March 3, 2014 17:42
mlynch added a commit that referenced this pull request Mar 3, 2014
Merge pull request #706 from driftyco/wip-draggable-toggle
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

Successfully merging this pull request may close these issues.

2 participants