feat:enhance layoutConfig
This commit is contained in:
6
doric-js/lib/src/util/layoutconfig.d.ts
vendored
6
doric-js/lib/src/util/layoutconfig.d.ts
vendored
@@ -46,8 +46,14 @@ export declare class LayoutConfigImpl implements LayoutConfig, Modeling {
|
||||
minWidth?: number;
|
||||
minHeight?: number;
|
||||
fit(): this;
|
||||
fitWidth(): this;
|
||||
fitHeight(): this;
|
||||
most(): this;
|
||||
mostWidth(): this;
|
||||
mostHeight(): this;
|
||||
just(): this;
|
||||
justWidth(): this;
|
||||
justHeight(): this;
|
||||
configWidth(w: LayoutSpec): this;
|
||||
configHeight(h: LayoutSpec): this;
|
||||
configMargin(m: {
|
||||
|
@@ -19,16 +19,40 @@ export class LayoutConfigImpl {
|
||||
this.heightSpec = LayoutSpec.FIT;
|
||||
return this;
|
||||
}
|
||||
fitWidth() {
|
||||
this.widthSpec = LayoutSpec.FIT;
|
||||
return this;
|
||||
}
|
||||
fitHeight() {
|
||||
this.heightSpec = LayoutSpec.FIT;
|
||||
return this;
|
||||
}
|
||||
most() {
|
||||
this.widthSpec = LayoutSpec.MOST;
|
||||
this.heightSpec = LayoutSpec.MOST;
|
||||
return this;
|
||||
}
|
||||
mostWidth() {
|
||||
this.widthSpec = LayoutSpec.MOST;
|
||||
return this;
|
||||
}
|
||||
mostHeight() {
|
||||
this.widthSpec = LayoutSpec.MOST;
|
||||
return this;
|
||||
}
|
||||
just() {
|
||||
this.widthSpec = LayoutSpec.JUST;
|
||||
this.heightSpec = LayoutSpec.JUST;
|
||||
return this;
|
||||
}
|
||||
justWidth() {
|
||||
this.widthSpec = LayoutSpec.JUST;
|
||||
return this;
|
||||
}
|
||||
justHeight() {
|
||||
this.heightSpec = LayoutSpec.JUST;
|
||||
return this;
|
||||
}
|
||||
configWidth(w) {
|
||||
this.widthSpec = w;
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user