Closed lkostrowski closed 7 years ago
Thanks for the feedback @vorthess!
I have thought of this before, kept deciding it wasn't necessary but I have seen a few examples where people implement it themselves so maybe it would be useful if it was prebuilt.
Maybe have like a "polyfillSpeedUp" and "polyfillSpeedDown" config option that would default to 1 second.
I guess I would have to think about how it would work in terms of enabling and disabling that specific behavior. The polyfill is enabled by default in v2 of pressure. Would the "Down" be another setting? Would it be on by default? Would love to hear other peoples thoughts on this.
@marcusmolchany @henrahmagix
Yeah, that would be a nice thing to come prebuilt. polyfillSpeedUp
and polyfillSpeedDown
options make sense :+1:
I think it should be off by default, so the effect of lifting your finger off the screen is the same for both supported and unsupported: the thing snaps back to its default state.
Maybe "off" is simply polyfillSpeedDown: 0
to reduce configuration code?
@henrahmagix smart idea with setting the default of polyfillSpeedDown: 0
I like that.
@vorthess, curious about what your application of this would be?
@stuyam Im creating internal time tracking tool for my company, hybrid app in meteor, react, electron. Im using iphone 7 and I love 3d touch, so I want to implement few UI features ;)
Haven't had time to work on this yet. Would love help on this is people are willing 😄
Coming soon in version 2.1.0 of pressure.
Released in v2.1.0: https://github.com/stuyam/pressure/releases/tag/v2.1.0 Hope you find in useful! 😄
change() is triggering only increasing, while native support includes force change both ways. Is it possible to implement?