mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
implemented CSS animations
fixing animation tests
This commit is contained in:
@@ -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
12
ui/page/page.d.ts
vendored
@@ -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).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user