diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout/engine.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim index 3b153b36..92a1e251 100644 --- a/src/layout/engine.nim +++ b/src/layout/engine.nim @@ -2210,7 +2210,7 @@ proc layoutBlockChildren(state: var BlockState, bctx: var BlockContext, # * if our saved marginTarget and bctx's marginTarget no longer point # to the same object, that means our (or an ancestor's) offset has # been resolved, i.e. we can position floats already. - if state.isParentResolved(bctx): + if bctx.marginTarget != state.initialMarginTarget: # y offset resolved bctx.positionFloat(child, state.space, bctx.parentBps.offset) else: @@ -2311,7 +2311,7 @@ proc buildBlockLayout(bctx: var BlockContext, box: BlockBox, # be passed onto the next box. Set marginTarget to nil, so that if we # (or one of our ancestors) was still set as a marginTarget, it no # longer is. - #TODO we might need flushMargin & positionFloats here + bctx.positionFloats() bctx.marginTarget = nil # Reset parentBps to the previous node. bctx.parentBps = state.prevParentBps |