Releases: stuyam/pressure
Fix MacOS Safari Bug
Android Pointer bug fixes
This fixes issue #67 where some android devices have incorrect pointer pressure values.
Bug Fixes
Support for Pointer Events
This release has a few great improvements. 😄
Features
- Support for Pointer Events! #60
That means that any browser that supports Pointer Events and any device that gives a pressure reading should now work on pressure. Things like Microsoft Surfaces and Wacom Tablets will now work with pressure. 🎉
This also means that pressure is now more future proofed now that more browsers are adding support for pointer events! Can I Use Pointer Events
- Support for polyfillSpeedDown #56
Now you can set a speed in which you want the polyfill to "decrease" once the mouse or touch is released. By default this value is set to 0 so when you release your finger it snaps back to 0.
Changes
-
The
only
setting now acceptstouch
,mouse
, orpointer
to specify if you want pressure to only respond to specific events. -
The
polyfillSpeed
setting has been changed topolyfillSpeedUp
because thepolyfillSpeedDown
was added to this release.
Return void in jquery package
The jQuery package was updated to return void from the factory. This is because pressure is attached to $ so no return is needed.
Update environment loader to use UMD wrapper
This update adds the UMD gulp wrapper. This improves the way that pressure loads itself for RequireJS, CommonJS, or the browser Window. This improvement helps when using pressure with something like Webpack. See this pull request for more information: #52
Cancel the polyfill if at any point force is detected
See issue #50 for more information on this bug fix. The gist of it was that the polyfill and 3d touch could conflict when you touched very very lightly. Now even if the polyfill runs but then force is detected, the force will cancel the polyfill and take over.
Version 2 of Pressure
50 Commits.
80% of the file size of Pressure 1.
More flexible than Pressure 1.
Biggest Additions to v2.0.0
- Support for iOS 10.
- Polyfill is now enabled by default.
- You can set the polfillSpeed to tell pressure how fast you want it to run for 0 to 1.
- Support for Pressure is now tested on every single press of an element rather than once per page. This means you could switch between something like a mouse (that does NOT support force touch) and a trackpad (that does support force touch) and Pressure can handle it without having to refresh the page.
Lot's of hard work in this release so check it out and let me know me know what you think! 💥 🎉
Return early in node
- This release fixes a bug that was running pressure in an environment that has no window or document such as node.
Polyfill Support and Global Config
- The biggest addition to v1.0.0 is the polyfill support. Now you can optionally give "support" to older browsers and devices that do not support force or 3d touch. It uses time to fake a pressure value, the longer you press, the higher the "force" is returned. It takes one second to go from 0 to 1 and can do a good job of faking pressure if that if what you are looking for. The Instagram iOS app for example uses the "peek and pop" on iOS. If you have 3D touch support, then you can press hard on an Instagram photo to display it. Else if you do not have 3D touch support, you can simply long hold on an image and it will open it just like the 3D touch version. The same idea applies with the optional pressure.js polyfill support.
- Now you can set global configurations for pressure so you do not have to set them on each element if you are using options that will be used throughout your site.
- Fixed a bug that did not allow the value of 1 to be reached on force touch trackpads. Now every type of support will have a force value returned that goes from 0 to 1. Before force touch only got up to around 0.9997 or so.
- Other various bugs, improvements, and happinest went into making this build!
-Also this build starts the 1.0.0 track of pressure 🎉 This will make it easier to make smaller more incremental improvements to pressure.