fix(Slider): Animate transform, not width/height#3929
Open
pastelmind wants to merge 3 commits intoreact-native-elements:nextfrom
Open
fix(Slider): Animate transform, not width/height#3929pastelmind wants to merge 3 commits intoreact-native-elements:nextfrom
pastelmind wants to merge 3 commits intoreact-native-elements:nextfrom
Conversation
When resizing the mininum track of <Slider/>, animate transform properties (scaleX, scaleY) instead of width and height. This is needed because width and height cannot be animated with the native driver. This fixes a bug that caused errors in iOS and Android simulators when `animateTransitions` is enabled.
Author
|
Looks like this causes a visual glitch with the minimum track. Since the tracks are being stretched with I "fixed" the glitch (ba83637) by moving the minimum track inside the maximum track, and setting
Update: ba83637 makes |
Using scaleX/scaleY to transform the minimum track causes the border radius to be distorted. In order to render round track corners, this PR moves the minimum track inside the maximum track, removes the border radius from the inner track, and sets `overflow: 'hidden'` on the maximum track.
Since the previous commits made it unnecessary to use the measured track size, let's remove the track size measuring logic altogether.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


When resizing the mininum track of
<Slider/>, animate transform properties (scaleX,scaleY) instead ofwidthandheight. This is needed becausewidthandheightcannot be animated with the native driver.This fixes a bug that caused errors in iOS and Android simulators when
animateTransitionsis enabled.Motivation
Fixes #3928
Type of change
How Has This Been Tested?
exampleappChecklist
yarn docs-build-apiAdditional context