-
Notifications
You must be signed in to change notification settings - Fork 478
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
SliderComponent Update #274
Conversation
…tion which offsets the pointForValue and valueForPoint modulates
…e tap-target of the sliderComponent, with automatic matching of borderRadius and positioning
… sliders that are also bounded, and update the dragging constraints of vertical bounded sliders
…s not to use percentages throughout
# Conflicts: # framer/Components/SliderComponent.coffee
Thanks @benjaminnathan! So it looks like the only remaining thing to do is to decide on the final name of what's currently called "bounded". Some more alternatives:
Or to make things really complicated (but more versatile) we allow to set modes for X and Y anchorage:
|
Instead of the slider.knob.constrained = true We don't want to the property to become overly verbose (constrainToSlider), yet at the same time it has to be clearer than the term "bounded" currently is. Making it a property on the knob instead helps. The knob is either constrained (to the slider), or not. (Technically it is always constrained, but not within the slider). Latest commit contains these changes, and has this property implemented. |
+1 |
👌🏻
|
LGTM |
# Conflicts: # extras/Studio.framer/framer/framer.debug.js.map # extras/Studio.framer/index.html
SliderComponent Update
This update focuses on implementing two new features:
Set Changes
borderRadius
warning by not using percentages to round the knob anymore.See a video demo of this here — http://cl.ly/e5bS
Changes Up For Discussion
Property: hitArea
hitArea
property allows you to create larger, easier clickable/tappable sliders. It creates two layers that are always placed on top of both the knob and the slider itself. Previously, I called this propertytapSize
, buthitArea
seems to be preferred. (@koenbok, @jordandobson).Here it is visualized: (these layers are transparent by default)
knobOverlay
andsliderOverlay
. I feel like these could be hidden from the Layer Panel. But this would be a first. What do you guys think?Property: bounded
bounded
property prevents the knob from ever exceeding the width (minX, maxX) of the slider. This is preferred for Desktop/Web sliders. The naming of this property is tricky.Alternatives by @edwinvanrijkom:
I'm not a fan of using "track" - since we never use this term in the component iself. In Framer, the track is simply the slider itself. I like
constrainToSlider
, but it's also quite verbose.Would love your input on these, guys. Wanted to fix the open issues, implement the value emitting and turn it all into a single pull-request so I could provide a single, neat little overview. Let's all continue here.
/cc @koenbok @edwinvanrijkom @marckrenn, @jordandobson