iOS:add FlexLayoutNode
This commit is contained in:
7
doric-js/lib/src/ui/view.d.ts
vendored
7
doric-js/lib/src/ui/view.d.ts
vendored
@@ -3,6 +3,7 @@ import { Modeling, Model } from "../util/types";
|
||||
import { BridgeContext } from "../runtime/global";
|
||||
import { LayoutConfig } from '../util/layoutconfig';
|
||||
import { IAnimation } from "./animation";
|
||||
import { FlexConfig } from "../util/flexbox";
|
||||
export declare function Property(target: Object, propKey: string): void;
|
||||
export interface IView {
|
||||
width?: number;
|
||||
@@ -56,6 +57,11 @@ export interface IView {
|
||||
* rotation*PI
|
||||
*/
|
||||
rotation?: number;
|
||||
/**----------transform----------*/
|
||||
/**
|
||||
* Only affected when its superview or itself is FlexLayout.
|
||||
*/
|
||||
flexConfig?: FlexConfig;
|
||||
}
|
||||
export declare type NativeViewModel = {
|
||||
id: string;
|
||||
@@ -149,6 +155,7 @@ export declare abstract class View implements Modeling, IView {
|
||||
pivotY?: number;
|
||||
rotation?: number;
|
||||
/**----------transform----------*/
|
||||
flexConfig?: FlexConfig;
|
||||
doAnimation(context: BridgeContext, animation: IAnimation): Promise<void>;
|
||||
}
|
||||
export declare abstract class Superview extends View {
|
||||
|
||||
@@ -177,7 +177,6 @@ export class View {
|
||||
getLocationOnScreen(context) {
|
||||
return this.nativeChannel(context, "getLocationOnScreen")();
|
||||
}
|
||||
/**----------transform----------*/
|
||||
doAnimation(context, animation) {
|
||||
return this.nativeChannel(context, "doAnimation")(animation.toModel()).then((args) => {
|
||||
for (let key in args) {
|
||||
@@ -267,6 +266,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Number)
|
||||
], View.prototype, "rotation", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
], View.prototype, "flexConfig", void 0);
|
||||
export class Superview extends View {
|
||||
subviewById(id) {
|
||||
for (let v of this.allSubviews()) {
|
||||
|
||||
Reference in New Issue
Block a user