diff --git a/README.md b/README.md index 1720293..642c7e2 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ import SortableGrid from 'react-native-sortable-grid' How long must the user hold the press on the block until it becomes active and can be dragged (milliseconds) - - ``` doubleTapTreshold ``` **Number** + - ``` doubleTapThreshold ``` **Number** How long will the execution wait for the second tap before deciding it was a single tap (milliseconds). Will be omitted if no onDoubleTap-property is given to the item being tapped - In which case single-tap callback will be executed instantly diff --git a/index.js b/index.js index 4b91802..8328511 100644 --- a/index.js +++ b/index.js @@ -77,7 +77,7 @@ class SortableGrid extends Component { this.activeBlockCenteringDuration = ACTIVE_BLOCK_CENTERING_DURATION this.itemsPerRow = ITEMS_PER_ROW this.dragActivationTreshold = DRAG_ACTIVATION_TRESHOLD - this.doubleTapTreshold = DOUBLETAP_TRESHOLD + this.doubleTapThreshold = DOUBLETAP_TRESHOLD this.onDragRelease = NULL_FN this.onDragStart = NULL_FN this.onDeleteItem = NULL_FN @@ -496,7 +496,7 @@ class SortableGrid extends Component { this.tapTimer = setTimeout( () => { this.doubleTapWait = false onTap() - }, this.doubleTapTreshold) + }, this.doubleTapThreshold) } _onDoubleTap = (onDoubleTap) => { @@ -508,7 +508,7 @@ class SortableGrid extends Component { _resetTapIgnoreTime = () => { clearTimeout(this.tapTimer) - this.tapTimer = setTimeout(() => this.tapIgnore = false, this.doubleTapTreshold) + this.tapTimer = setTimeout(() => this.tapIgnore = false, this.doubleTapThreshold) } createTouchHandlers = () =>