upodate flexnode settings
This commit is contained in:
@@ -1,48 +1,60 @@
|
||||
|
||||
import { Group, Panel, text, gravity, Color, LayoutSpec, vlayout, hlayout, scroller, IVLayout, IHLayout, layoutConfig, stack, Gravity, flexlayout } from "doric";
|
||||
import { FlexDirection, Wrap, Justify, Align, FlexTypedValue } from "doric/lib/src/util/flexbox";
|
||||
import { FlexDirection, Wrap, Justify, Align, FlexTypedValue, OverFlow } from "doric/lib/src/util/flexbox";
|
||||
import { colors } from "./utils";
|
||||
|
||||
@Entry
|
||||
class LayoutDemo extends Panel {
|
||||
build(root: Group) {
|
||||
flexlayout(
|
||||
stack(
|
||||
[
|
||||
stack([], {
|
||||
flexConfig: {
|
||||
width: 100,
|
||||
height: 100,
|
||||
},
|
||||
backgroundColor: colors[0]
|
||||
}),
|
||||
stack([], {
|
||||
flexConfig: {
|
||||
width: 100,
|
||||
height: 100,
|
||||
},
|
||||
backgroundColor: colors[1],
|
||||
}),
|
||||
stack([], {
|
||||
flexConfig: {
|
||||
width: 100,
|
||||
height: 100,
|
||||
},
|
||||
backgroundColor: colors[2],
|
||||
}),
|
||||
scroller(
|
||||
flexlayout(
|
||||
[
|
||||
stack([],
|
||||
{
|
||||
backgroundColor: colors[1],
|
||||
flexConfig: {
|
||||
width: 300,
|
||||
height: 100,
|
||||
}
|
||||
}),
|
||||
stack([],
|
||||
{
|
||||
backgroundColor: colors[2],
|
||||
flexConfig: {
|
||||
width: 100,
|
||||
height: 100,
|
||||
}
|
||||
}),
|
||||
stack([],
|
||||
{
|
||||
backgroundColor: colors[3],
|
||||
flexConfig: {
|
||||
width: 100,
|
||||
height: 100,
|
||||
}
|
||||
}),
|
||||
],
|
||||
{
|
||||
flexConfig: {
|
||||
flexDirection: FlexDirection.COLUMN,
|
||||
},
|
||||
backgroundColor: colors[4]
|
||||
}),
|
||||
{
|
||||
layoutConfig: {
|
||||
widthSpec: LayoutSpec.FIT,
|
||||
heightSpec: LayoutSpec.FIT
|
||||
},
|
||||
backgroundColor: colors[0],
|
||||
})
|
||||
],
|
||||
{
|
||||
layoutConfig: layoutConfig().fit(),
|
||||
backgroundColor: Color.GRAY,
|
||||
flexConfig: {
|
||||
flexDirection: FlexDirection.COLUMN,
|
||||
justifyContent: Justify.SPACE_EVENLY,
|
||||
alignContent: Align.CENTER,
|
||||
flexWrap: Wrap.WRAP,
|
||||
width: FlexTypedValue.Auto,
|
||||
height: FlexTypedValue.Auto,
|
||||
}
|
||||
layoutConfig: layoutConfig().just(),
|
||||
width: 250,
|
||||
height: 250,
|
||||
}
|
||||
)
|
||||
.in(root)
|
||||
).in(root)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user