Layout add minWidth minHeight maxWidth maxHeight

This commit is contained in:
pengfei.zhou
2020-04-11 12:20:43 +08:00
committed by osborn
parent 4e537eed47
commit 80811a3bf6
15 changed files with 228 additions and 112 deletions

12
doric-js/index.d.ts vendored
View File

@@ -1197,6 +1197,10 @@ declare module 'doric/lib/src/util/layoutconfig' {
};
alignment?: Gravity;
weight?: number;
maxWidth?: number;
maxHeight?: number;
minWidth?: number;
minHeight?: number;
}
export class LayoutConfigImpl implements LayoutConfig, Modeling {
widthSpec?: LayoutSpec;
@@ -1209,6 +1213,10 @@ declare module 'doric/lib/src/util/layoutconfig' {
};
alignment?: Gravity;
weight?: number;
maxWidth?: number;
maxHeight?: number;
minWidth?: number;
minHeight?: number;
fit(): this;
most(): this;
just(): this;
@@ -1222,6 +1230,10 @@ declare module 'doric/lib/src/util/layoutconfig' {
}): this;
configAlignment(a: Gravity): this;
configWeight(w: number): this;
configMaxWidth(v: number): this;
configMaxHeight(v: number): this;
configMinWidth(v: number): this;
configMinHeight(v: number): this;
toModel(): {
widthSpec: LayoutSpec | undefined;
heightSpec: LayoutSpec | undefined;