remove-ios-bounce
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "remove-ios-bounce", | ||
"version": "1.0.3", | ||
"description": "Remove iOS bounce by Touch evnet listener and setting element's scorllTop/scrollLeft attribute.", | ||
"version": "1.0.4", | ||
"description": "Remove iOS bounce by Touch evnet listener and setting element's scorllTop&scrollLeft attribute.", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,4 +0,6 @@ | ||
# clear-bounce | ||
Remove iOS bounce by Touch evnet listener and css-Translate. | ||
# remove-ios-bounce | ||
Remove iOS bounce by Touch evnet listener and settting scrollTop&scrollLeft attributes. | ||
<p>SUGGEST: <a href="https://github.com/yource/bounce-pro" traget="_blank" >bounce-pro</a></p> | ||
## Installing | ||
@@ -14,7 +16,14 @@ Using npm: | ||
## Example | ||
remove bounce effects on body: | ||
``` | ||
import {removeBodyBounce} from 'remove-ios-bounce'; | ||
removeBodyBounce(); | ||
``` | ||
remove bounce effects on other elements: | ||
``` | ||
import {RemoveBounce} from 'remove-ios-bounce'; | ||
/** | ||
* new ClearBounce(containerElement, onlyIOS) | ||
* new RemoveBounce(containerElement, onlyIOS) | ||
* @param:containerElement, required | ||
@@ -24,12 +33,7 @@ * @param:onlyIOS, Boolean, not required(defalut false). TRUE means the function will work on iOS only. | ||
const bounceCtrl = new RemoveBounce( document.getElementById('container')); | ||
// After the containerElement is rendered, perform initialization. | ||
const bounceCtrl = new RemoveBounce(document.getElementById('container')); | ||
// remove event listener by destory funciton | ||
// Before the containerElement is removed, clear event listener by destory function. | ||
bounceCtrl.destory(); | ||
``` | ||
``` | ||
import {removeBodyBounce} from 'remove-ios-bounce'; | ||
/** | ||
* Use this function to remove "bounce" effects on body | ||
**/ | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10726
38
0