feat:enhance layoutConfig

This commit is contained in:
pengfei.zhou
2021-05-14 19:32:19 +08:00
committed by osborn
parent 7ee30d1cd3
commit 57643c5990
11 changed files with 178 additions and 40 deletions

View File

@@ -76,18 +76,48 @@ export class LayoutConfigImpl implements LayoutConfig, Modeling {
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: LayoutSpec) {
this.widthSpec = w
return this