-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tvOS] onPress animation with magnification #15455
Closed
Closed
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4aed47d
[tvOS] Change behavior of onPress
JulienKode b0c6ec4
[tvOS] Allow to anim on press on tvOS
JulienKode 812e6ac
[Enable checking]
JulienKode da967ca
[TouchableHighlight] Update documentation
JulienKode 6990bdc
[RCTTVView] add pressMagnification property
JulienKode 94ea7c8
[Docs] Update
JulienKode 7560ce0
[TouchableOpacity] Add documentation for tvParallaxProperties
JulienKode e3688b5
[Resolve]
JulienKode b9a1c42
[dlowder-salesforce] Changes
douglowder 43cac24
Animate from mag->pressMag->mag
douglowder eb7cbe4
Better momentary magnification on press
douglowder 1b52876
Update TouchableHighlight.js
JulienKode 619067f
[Merge] Resolving conflict with the master branch
JulienKode ba13cbe
Update ListExampleShared.js
JulienKode 1990467
Update RCTTVView.m
JulienKode 6a18f99
Merge branch 'master' into patch-3
JulienKode c26f992
Fix code style, remove whitespace
hramos 3c4489a
Update RCTTVView.m to match code style
hramos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
const ColorPropType = require('ColorPropType'); | ||
const NativeMethodsMixin = require('NativeMethodsMixin'); | ||
const PropTypes = require('prop-types'); | ||
const Platform = require('Platform'); | ||
const React = require('React'); | ||
const ReactNativeViewAttributes = require('ReactNativeViewAttributes'); | ||
const StyleSheet = require('StyleSheet'); | ||
|
@@ -110,6 +111,9 @@ var TouchableHighlight = createReactClass({ | |
* shiftDistanceY: Defaults to 2.0. | ||
* tiltAngle: Defaults to 0.05. | ||
* magnification: Defaults to 1.0. | ||
* pressMagnification: Defaults to 1.0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto. These will need to be copied over to the |
||
* pressDuration: Defaults to 0.3. | ||
* pressDelay: Defaults to 0.0. | ||
* | ||
* @platform ios | ||
*/ | ||
|
@@ -208,12 +212,13 @@ var TouchableHighlight = createReactClass({ | |
|
||
touchableHandlePress: function(e: Event) { | ||
this.clearTimeout(this._hideTimeout); | ||
this._showUnderlay(); | ||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment | ||
* suppresses an error when upgrading Flow's support for React. To see the | ||
* error delete this comment and run Flow. */ | ||
this._hideTimeout = this.setTimeout(this._hideUnderlay, | ||
this.props.delayPressOut || 100); | ||
if (!Platform.isTVOS) { | ||
this._showUnderlay(); | ||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment | ||
* suppresses an error when upgrading Flow's support for React. To see the | ||
* error delete this comment and run Flow. */ | ||
this._hideTimeout = this.setTimeout(this._hideUnderlay, this.props.delayPressOut || 100); | ||
} | ||
this.props.onPress && this.props.onPress(e); | ||
}, | ||
|
||
|
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 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's document these in https://github.com/facebook/react-native-website as well, since those are the docs that are displayed on the website itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the information @hramos I've created a pull request here facebook/react-native-website#176