Layout add minWidth minHeight maxWidth maxHeight
This commit is contained in:
12
doric-js/lib/src/util/layoutconfig.d.ts
vendored
12
doric-js/lib/src/util/layoutconfig.d.ts
vendored
@@ -25,6 +25,10 @@ export interface LayoutConfig {
|
||||
};
|
||||
alignment?: Gravity;
|
||||
weight?: number;
|
||||
maxWidth?: number;
|
||||
maxHeight?: number;
|
||||
minWidth?: number;
|
||||
minHeight?: number;
|
||||
}
|
||||
export declare class LayoutConfigImpl implements LayoutConfig, Modeling {
|
||||
widthSpec?: LayoutSpec;
|
||||
@@ -37,6 +41,10 @@ export declare class LayoutConfigImpl implements LayoutConfig, Modeling {
|
||||
};
|
||||
alignment?: Gravity;
|
||||
weight?: number;
|
||||
maxWidth?: number;
|
||||
maxHeight?: number;
|
||||
minWidth?: number;
|
||||
minHeight?: number;
|
||||
fit(): this;
|
||||
most(): this;
|
||||
just(): this;
|
||||
@@ -50,6 +58,10 @@ export declare class LayoutConfigImpl implements LayoutConfig, Modeling {
|
||||
}): 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;
|
||||
|
@@ -49,6 +49,22 @@ export class LayoutConfigImpl {
|
||||
this.weight = w;
|
||||
return this;
|
||||
}
|
||||
configMaxWidth(v) {
|
||||
this.maxWidth = v;
|
||||
return this;
|
||||
}
|
||||
configMaxHeight(v) {
|
||||
this.maxHeight = v;
|
||||
return this;
|
||||
}
|
||||
configMinWidth(v) {
|
||||
this.minWidth = v;
|
||||
return this;
|
||||
}
|
||||
configMinHeight(v) {
|
||||
this.minHeight = v;
|
||||
return this;
|
||||
}
|
||||
toModel() {
|
||||
return {
|
||||
widthSpec: this.widthSpec,
|
||||
|
Reference in New Issue
Block a user