-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.0.0. Introduce Activate by Tap and Click
New Props: * activationInteractionMouse * activationInteractionTouch * tapDurationInMs * tapMoveThreshold
- Loading branch information
1 parent
0209657
commit 4ed6fe6
Showing
45 changed files
with
12,037 additions
and
5,831 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest All", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["--runInBand"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | ||
} | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest Current File", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["${relativeFile}"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.9.0/styles/solarized-light.min.css"> | ||
<script src="//cdn.jsdelivr.net/highlight.js/9.9.0/highlight.min.js"></script> | ||
<link rel="stylesheet" href="styles.css"> | ||
<title>Class Name | Code Example | React Cursor Position</title> | ||
</head> | ||
<body> | ||
<pre> | ||
<code> | ||
import React from 'react'; | ||
import ReactCursorPosition, { INTERACTIONS } from 'react-cursor-position'; | ||
|
||
import PositionLabel from './PositionLabel'; | ||
import InstructionsLabel from './InstructionsLabel'; | ||
|
||
export default () => ( | ||
<ReactCursorPosition | ||
activationInteractionMouse={INTERACTIONS.HOVER} //default | ||
hoverDelayInMs={250} //default: 0 | ||
hoverOffDelayInMs={150} //default: 0 | ||
> | ||
<PositionLabel /> | ||
<InstructionsLabel /> | ||
</ReactCursorPosition> | ||
); | ||
</code> | ||
</pre> | ||
|
||
<script> | ||
hljs.initHighlightingOnLoad(); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
7 changes: 3 additions & 4 deletions
7
example/src/components/PressMoveThreshold.js → example/src/components/ActivationByClick.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
example/src/components/HoverDelay.js → example/src/components/ActivationByHover.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import ReactCursorPosition, { INTERACTIONS } from '../pkg-lnk/ReactCursorPosition'; | ||
import PositionLabel from './PositionLabel'; | ||
|
||
export default () => ( | ||
<ReactCursorPosition | ||
className="example__target" | ||
activationInteractionTouch={INTERACTIONS.PRESS} // default | ||
pressDurationInMs={500} //default | ||
pressMoveThreshold={5} //default | ||
> | ||
<PositionLabel /> | ||
<div className="example__instructions"> | ||
Press and hold to activate, then drag | ||
</div> | ||
</ReactCursorPosition> | ||
); | ||
|
7 changes: 3 additions & 4 deletions
7
example/src/components/PressDuration.js → example/src/components/ActivationByTap.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
example/src/components/IsActivatedOnTouch.js → example/src/components/ActivationByTouch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.