stuyam / pressure

:point_down::boom: JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure.
https://pressurejs.com
MIT License
2.92k stars 97 forks source link

Add documentation for the `css` parameter of public methods #9

Closed kylehalleman closed 8 years ago

kylehalleman commented 8 years ago

I noticed you add a user-select: none; rule to the Pressure element, which prevents users from being able to select text. Hammer.js does this as well, but explains in the docs why they do it, what the benefits are, and also gives developers a way to disable that functionality.

If you pass false as the third parameter to something like Pressure.set() this will prevent user-select: none; from being set, which I prefer, and others might as well. Could be useful to add in the documentation.

stuyam commented 8 years ago

@kylehalleman good digging through the code ;) you are exactly right I forgot to add those in the docs. Im working on v0.0.4 right now and will make sure to include that in the docs. I also added webkit-touch-callout:none; to prevent the "peek and pop" feature on the iPhone 6s. Thanks for the reminder and I really greatly appreciate the feedback!

stuyam commented 8 years ago

This is going to be released in the next version of the gh-pages branch, now it is a "preventDefault" option on v0.0.4