fix(ios): translate transform breaks sequential animation set (#5961)

* fix(ios): translate transform breaks sequential animation set

* chore: add e2e test app for animations
This commit is contained in:
Manol Donev
2018-06-19 10:38:29 +03:00
committed by GitHub
parent 3dc3a411c3
commit 6cfdc206d9
80 changed files with 930 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
import { EventData, NavigatedData } from "tns-core-modules/ui/page";
import { AnimationDefinition, Animation } from "tns-core-modules/ui/animation";
let page;
let label1;
let label2;
export function onNavigatedTo(args: NavigatedData) {
page = args.object;
label1 = page.getViewById("Label1");
label2 = page.getViewById("Label2");
}
export function onPlaySequentially(args: EventData) {
const definitions = new Array<AnimationDefinition>();
definitions.push({ target: label1, translate: { x: 100, y: 0 }, duration: 500 });
definitions.push({ target: label1, opacity: 0.1, duration: 500 });
const animationSet = new Animation(definitions, true);
animationSet.play()
.then(() => {
label1.text = "Label1 animated sequentially!";
});
}
export function onPlaySimultaneously(args: EventData) {
const definitions = new Array<AnimationDefinition>();
definitions.push({ target: label2, translate: { x: 0, y: 100 }, duration: 500 });
definitions.push({ target: label2, opacity: 0.1, duration: 500 });
const animationSet = new Animation(definitions, true);
animationSet.play()
.then(() => {
label2.text = "Label2 animated simultaneously!";
});
}