Use transform prop in PanResponderExample
Summary: Replaces deprecated `translateX` and `translateY` props with `transform` prop in PanResponderExample. This fixes the RNTester example for react-native-windows, which doesn't support the deprecated props. Changelog: [General][Fixed] - [RNTester] Use transform prop in PanResponderExample Reviewed By: kacieb Differential Revision: D28676164 fbshipit-source-id: 437912b5abf6ca74f0043ded7a902a5938bcf93a
This commit is contained in:
Родитель
3a9e14e8a9
Коммит
917f83c940
|
@ -112,8 +112,10 @@ class PanResponderExample extends React.Component<Props, State> {
|
||||||
styles.circle,
|
styles.circle,
|
||||||
// $FlowFixMe[incompatible-type]
|
// $FlowFixMe[incompatible-type]
|
||||||
{
|
{
|
||||||
translateX: this.state.left,
|
transform: [
|
||||||
translateY: this.state.top,
|
{translateX: this.state.left},
|
||||||
|
{translateY: this.state.top},
|
||||||
|
],
|
||||||
backgroundColor: this.state.pressed ? 'blue' : 'green',
|
backgroundColor: this.state.pressed ? 'blue' : 'green',
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче