implemented CSS animations

fixing animation tests
This commit is contained in:
Tsvetan Raikov
2016-03-24 18:42:58 +02:00
parent f42b13322a
commit 073cc94926
30 changed files with 1750 additions and 256 deletions

View File

@@ -8,6 +8,7 @@ import * as style from "../styling/style";
import * as fileSystemModule from "file-system";
import * as frameModule from "ui/frame";
import proxy = require("ui/core/proxy");
import keyframeAnimation = require("ui/animation/keyframe-animation");
var fs: typeof fileSystemModule;
function ensureFS() {
@@ -175,6 +176,15 @@ export class Page extends ContentView implements dts.Page {
}
}
public removeCssSelectors(selectorExpression: string) {
this._styleScope.removeSelectors(selectorExpression);
this._refreshCss();
}
public getKeyframeAnimationWithName(animationName: string): keyframeAnimation.KeyframeAnimationInfo {
return this._styleScope.getKeyframeAnimationWithName(animationName);
}
get frame(): frameModule.Frame {
return <frameModule.Frame>this.parent;
}

12
ui/page/page.d.ts vendored
View File

@@ -8,6 +8,7 @@ declare module "ui/page" {
import frame = require("ui/frame");
import actionBar = require("ui/action-bar");
import dependencyObservable = require("ui/core/dependency-observable");
import keyframeAnimation = require("ui/animation/keyframe-animation");
//@private
import styleScope = require("ui/styling/style-scope");
@@ -120,6 +121,17 @@ declare module "ui/page" {
*/
addCssFile(cssFileName: string): void;
/**
* Removes all selectors matching the specified selector expression.
* @param selectorExpression - A valid selector expression.
*/
removeCssSelectors(selectorExpression: string): void;
/**
* Returns a CSS keyframe animation with the specified name, if it exists.
*/
getKeyframeAnimationWithName(animationName: string): keyframeAnimation.KeyframeAnimationInfo;
/**
* A property that is used to pass a data from another page (while navigate to).
*/