Scoop API

scoop:scoop.ui:0.1.0

src/layout/finish.scoop

Selected production source · src/layout/finish.scoop

1package scoop.ui
3/** Only the selected graph finalizes item retention; trials never publish geometry. */
4internal fun NodeLayout.finishMeasurement() {
5 if (!node.root.isOpen)
6 throw UiLayoutEnded()
7 val round = node.root.layouts.round
8 if (sameLayoutRound(selected, round))
9 return
10 selected = Some(round)
11 when ((body, node.body)) {
12 case(Lazy(_, val selection), Lazy(_, val items)) -> items.finish(node, selection)
13 else -> {}
14 }
15 for (child in children)
16 child.result?.finishMeasurement()