I have a custom `Layout` component, that does all ...
# compose
o
I have a custom
Layout
component, that does all the measurements and placements. Now, I want to draw some adornments on the canvas, kinda like
drawBehind
, but I need to know placements of the children. How would I do it?
Uhm, looking into
LayoutNodeDrawScope
while trying to find the solution, is
draw
function NOT exception safe? If the drawing callback throws, it won’t restore the state…
It looks like I can use
onGloballyPositioned
, combined with
drawBehind
, and it works. However, when combined with vertical scroll, it doesn’t reflect scroll state. Is it a bug, or do I need to adjust to the scroll state manually somehow?
I did it wrong, called drawBehind on wrong container