feat:step5
This commit is contained in:
parent
91a26eb9a8
commit
209a9267fe
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import { Group, Panel, Text, text, gravity, Color, Stack, LayoutSpec, list, NativeCall, listItem, log, vlayout, Gravity, hlayout, slider, slideItem, scroller, IVLayout, IHLayout } from "doric";
|
import { Group, Panel, Text, text, gravity, Color, Stack, LayoutSpec, list, NativeCall, listItem, log, vlayout, Gravity, hlayout, slider, slideItem, scroller, IVLayout, IHLayout, layoutConfig } from "doric";
|
||||||
import { O_TRUNC } from "constants";
|
import { O_TRUNC } from "constants";
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
@ -453,11 +453,7 @@ class LayoutDemo extends Panel {
|
|||||||
it.space = 20
|
it.space = 20
|
||||||
}),
|
}),
|
||||||
).also(it => {
|
).also(it => {
|
||||||
it.layoutConfig = {
|
it.layoutConfig = layoutConfig().atmost()
|
||||||
widthSpec: LayoutSpec.WRAP_CONTENT,
|
|
||||||
heightSpec: LayoutSpec.WRAP_CONTENT,
|
|
||||||
alignment: gravity().centerX(),
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.in(rootView)
|
.in(rootView)
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,6 @@ - (void)layoutSelf:(CGSize)targetSize {
|
|||||||
[self setContentSize:self.contentView.frame.size];
|
[self setContentSize:self.contentView.frame.size];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGSize)measureSize:(CGSize)targetSize {
|
|
||||||
CGSize size = [super measureSize:targetSize];
|
|
||||||
return CGSizeMake(MIN(targetSize.width, size.width), MIN(targetSize.height, size.height));
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface DoricScrollerNode ()
|
@interface DoricScrollerNode ()
|
||||||
|
Reference in New Issue
Block a user