feat: Add 3D rotation to view - takeover of PR# 5950 (#8136)

* feat: add 3d rotation

* chore: fix build errors

* chore: fix tslint errors

* chore: add @types/chai dev dep

* chore: unused import cleanup

* chore: update tests for x,y rotation

* chore: rebase upstream/master

* fix: iOS Affine Transform test verification

* feat(css): Added optional css-tree parser (#8076)

* feat(css): Added optional css-tree parser

* test: css-tree parser compat tests

* test: more css-tree compat tests

* feat(dialogs): Setting the size of popup dialog thru dialog options (#8041)

* Added iOS specific height and width attributes to ShowModalOptions

* Set the height and width of the popup dialog to the presenting controller

* dialog options ios attributes presentationStyle, height & width are made optional

* Updated NativeScript.api.md for public API changes

* Update with git properties

* Public API

* CLA update

* fix: use iOS native-helper for 3d-rotate

* test: Fix tests using _getTransformMismatchError

* fix: view.__hasTransfrom not set updating properly

* test: fix css-animations test page

Co-authored-by: Alexander Vakrilov <alexander.vakrilov@gmail.com>
Co-authored-by: Darin Dimitrov <darin.dimitrov@gmail.com>
Co-authored-by: Shailesh Lolam <slolam@live.com>
Co-authored-by: Dimitar Topuzov <dtopuzov@gmail.com>
This commit is contained in:
Ryan Pendergast
2020-01-10 04:59:46 -06:00
committed by Alexander Vakrilov
parent 8550c3293d
commit e8f5ac8522
31 changed files with 709 additions and 192 deletions

View File

@@ -433,6 +433,7 @@ function animateExtentAndAssertExpected(along: "height" | "width", value: Percen
expectedNumber,
`PercentLength.toDevicePixels(${inputString}) should be "${expectedNumber}" but is "${observedNumber}"`
);
assertIOSNativeTransformIsCorrect(label);
});
}

View File

@@ -122,7 +122,7 @@ export function test_ReadTransformAllSet() {
const animation = createAnimationFromCSS(css, "test");
const { rotate, scale, translate } = getTransformsValues(animation.keyframes[0].declarations);
TKUnit.assertAreClose(rotate, 10, DELTA);
TKUnit.assertAreClose(rotate.z, 10, DELTA);
TKUnit.assertAreClose(scale.x, 5, SCALE_DELTA);
TKUnit.assertAreClose(scale.y, 1, SCALE_DELTA);
@@ -136,7 +136,7 @@ export function test_ReadTransformNone() {
const animation = createAnimationFromCSS(css, "test");
const { rotate, scale, translate } = getTransformsValues(animation.keyframes[0].declarations);
TKUnit.assertEqual(rotate, 0);
TKUnit.assertEqual(rotate.z, 0);
TKUnit.assertEqual(scale.x, 1);
TKUnit.assertEqual(scale.y, 1);
@@ -271,7 +271,7 @@ export function test_ReadRotate() {
const { rotate } = getTransforms(animation.keyframes[0].declarations);
TKUnit.assertEqual(rotate.property, "rotate");
TKUnit.assertAreClose(rotate.value, 5, DELTA);
TKUnit.assertAreClose(rotate.value.z, 5, DELTA);
}
export function test_ReadRotateDeg() {
@@ -280,7 +280,7 @@ export function test_ReadRotateDeg() {
const { rotate } = getTransforms(animation.keyframes[0].declarations);
TKUnit.assertEqual(rotate.property, "rotate");
TKUnit.assertAreClose(rotate.value, 45, DELTA);
TKUnit.assertAreClose(rotate.value.z, 45, DELTA);
}
export function test_ReadRotateRad() {
@@ -289,7 +289,7 @@ export function test_ReadRotateRad() {
const { rotate } = getTransforms(animation.keyframes[0].declarations);
TKUnit.assertEqual(rotate.property, "rotate");
TKUnit.assertAreClose(rotate.value, 45, DELTA);
TKUnit.assertAreClose(rotate.value.z, 45, DELTA);
}
export function test_ReadAnimationWithUnsortedKeyframes() {