feat:android add transformation properties

This commit is contained in:
pengfei.zhou
2019-11-29 18:23:33 +08:00
parent 8b22f3e362
commit f5f157a0b6
2 changed files with 241 additions and 24 deletions

View File

@@ -42,6 +42,30 @@ export interface IView {
layoutConfig?: LayoutConfig
onClick?: Function
identifier?: string
/**++++++++++transform++++++++++*/
translationX?: number
translationY?: number
scaleX?: number
scaleY?: number
/**
* float [0,..1]
*/
pivotX?: number
/**
* float [0,..1]
*/
pivotY?: number
rotation?: number
rotationX?: number
rotationY?: number
/**----------transform----------*/
}
@@ -61,9 +85,6 @@ export abstract class View implements Modeling, IView {
@Property
bgColor?: Color | GradientColor
@Property
rotation?: number
@Property
corners?: number | { leftTop?: number; rightTop?: number; leftBottom?: number; rightBottom?: number }
@@ -288,6 +309,35 @@ export abstract class View implements Modeling, IView {
getRotation(context: BridgeContext) {
return this.nativeChannel(context, 'getRotation')() as Promise<number>
}
/**++++++++++transform++++++++++*/
@Property
translationX?: number
@Property
translationY?: number
@Property
scaleX?: number
@Property
scaleY?: number
@Property
pivotX?: number
@Property
pivotY?: number
@Property
rotation?: number
@Property
rotationX?: number
@Property
rotationY?: number
/**----------transform----------*/
}
export abstract class Superview extends View {