@@ -403,7 +403,12 @@ view =
405 [ centerX, label "Nearby Elements", spacing 100 ]
405 [ centerX, label "Nearby Elements", spacing 100 ]
407+ , overlappingChildren
409+ -- Note: visibility checks like the above
410+ -- need to be at the top so they're in the viewport
406− [ master
411+ , master
407 , masterParagraph
412 , masterParagraph
408 , nearby above "above" box
413 , nearby above "above" box
409 , nearby below "below" box
414 , nearby below "below" box
@@ -411,14 +416,13 @@ view =
411 , nearby onRight "onRight" box
416 , nearby onRight "onRight" box
412 , nearby onLeft "onLeft" box
417 , nearby onLeft "onLeft" box
413 , nearby behindContent "behindContent" transparentBox
418 , nearby behindContent "behindContent" transparentBox
415− , overlappingChildren
419layeredVisibility =
422layeredVisibility =
421− [ inFront (justBox 40 red [ isVisible ])
425+ , inFront (justBox 40 red [ isVisible ])
423 (el [ inFront (justBox 30 green []) ]
427 (el [ inFront (justBox 30 green []) ]
424 (justBox 50 blue [])
428 (justBox 50 blue [])
@@ -426,7 +430,7 @@ layeredVisibility =
428overlappingChildren =
432overlappingChildren =
429− row []
433+ row [ centerX ]
430 [ el [ inFront (justBox 40 green []) ]
434 [ el [ inFront (justBox 40 green []) ]
431 (justBox 40 darkGrey [])
435 (justBox 40 darkGrey [])
432 , el [ onLeft (littleBox "overlapping" [ isVisible, Background.color red ]) ]
436 , el [ onLeft (littleBox "overlapping" [ isVisible, Background.color red ]) ]