mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Add support for clamping for NativeAnimated on iOS
Summary: This diff adds support for clamping on iOS. It separates out code originally submitted in #9048. Test plan (required) Run UIExplorer NativeAnimated examples before and after - compare the results. Pay special attention to the new clamped spring example. Closes https://github.com/facebook/react-native/pull/9625 Differential Revision: D4053231 fbshipit-source-id: 29048de444ff5f6d7fe7dce7897399b483ee6d2d
This commit is contained in:
committed by
Facebook Github Bot
parent
518915a750
commit
5794ff61bc
@@ -320,7 +320,7 @@ exports.examples = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Scale interpolation',
|
||||
title: 'Scale interpolation with clamping',
|
||||
description: 'description',
|
||||
render: function() {
|
||||
return (
|
||||
@@ -335,8 +335,9 @@ exports.examples = [
|
||||
transform: [
|
||||
{
|
||||
scale: anim.interpolate({
|
||||
inputRange: [0, 1],
|
||||
inputRange: [0, 0.5],
|
||||
outputRange: [1, 1.4],
|
||||
extrapolateRight: 'clamp',
|
||||
})
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user