Commit Graph

5 Commits

Author SHA1 Message Date
Sophie Alpert 1490ab12ef Update license headers for MIT license
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.

find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.

Reviewed By: TheSavior, yungsters

Differential Revision: D7007050

fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
2018-02-16 18:31:53 -08:00
Sokovikov c87c4d052f Fixed previously broken support for negative `scale` (`transform` style property)
Summary:
closes #13081

UIExplorer, TransformExample
Closes https://github.com/facebook/react-native/pull/13083

Reviewed By: mmmulani

Differential Revision: D4758237

Pulled By: shergin

fbshipit-source-id: 58385a4cde7a739b6657c293c381644a92918265
2017-03-24 18:15:42 -07:00
Valentin Shergin 64c327ae68 Fixed issue where setting `zero scale` transfrom matrix to UIView brokes `hitTest` mechanism
Summary:
The Math Strikes Back

Several related things:
 * When we specify `scale: 0;` style for some view it ends up with calling `CATransform3DScale` with zero scale parameter.
 * In this case `CATransform3DScale` returns transform matrix full of zeros. It actually depends on representation and matrix-type (2d or 3d) but in UIView debugger it appears as [0, 0, 0, 0, ...]. And probably it is correct result.
 * By default, for hit-testing, UIKit uses specially optimized logic based on GPU/CALayer infrastructure under the hood. And the transform matrix full of zeros breaks this algorithm. I guess, it happens because zero-matrix doesn't quite make sense.

So, `scale: 0;` is a weird edge case, and in this diff, we are trying to illuminate it by replacing with epsilon value.

Related SO issues:
http://stackoverflow.com/questions/25964224/cgaffinetransformscale-not-working-with-zero-scale
http://stackoverflow.com/questions/7937369/animate-uiview-scale-to-zero

Reviewed By: blairvanderhoof

Differential Revision: D4734475

fbshipit-source-id: 7241cdffa86c05a6552860a25789e2281588ba23
2017-03-19 22:01:55 -07:00
Max Graey c68195929b Fix skew transform on native side (iOS & Android)
Summary:
According to #11992 fix skew transform in native code as well

janicduplessis vjeux
Closes https://github.com/facebook/react-native/pull/12106

Differential Revision: D4479880

fbshipit-source-id: d84780842b555f6352d84d229b5b6c5c3c6a0647
2017-01-28 12:43:30 -08:00
Ryan Gomba 7e869b9d0a Drive any numerical prop via NativeAnimated
Summary:
In theory, we should be able to animate any non-layout property, including custom ones. While there is still work to be done on the native side to fully enable this, we should start by dropping the prop whitelist.
Closes https://github.com/facebook/react-native/pull/10658

Differential Revision: D4379031

Pulled By: ericvicenti

fbshipit-source-id: fe9c30ea101e93a8b260d7d09a909fafbb82fee6
2017-01-26 18:28:53 -08:00