packages feed

yoga 0.0.0.7 → 0.0.0.8

raw patch · 2 files changed

+3/−3 lines, 2 files

Files

lib/Yoga.hs view
@@ -172,12 +172,12 @@   c'YGNodeStyleSetJustifyContent ptr just
   c'YGNodeStyleSetFlexWrap ptr c'YGWrapNoWrap
 
-  cs' <- forM cs $ \node -> do
+  cs' <- forM (zip [0..] cs) $ \(idx, node) -> do
     nodeTree <- generateLayout node
     case nodeTree of
       Root p children fptr -> withForeignPtr fptr $ \oldptr -> do
         newptr <- c'YGNodeClone oldptr
-        c'YGNodeInsertChild ptr newptr 0
+        c'YGNodeInsertChild ptr newptr idx
         return $ if null children
                  then Leaf p
                  else Container p children
yoga.cabal view
@@ -3,7 +3,7 @@ -- see http://haskell.org/cabal/users-guide/
 
 name:                yoga
-version:             0.0.0.7
+version:             0.0.0.8
 synopsis:            Bindings to Facebook's Yoga layout library
 description:         The <https://facebook.github.com/yoga Yoga> library from
                      <https://facebook.github.com/ Facebook> is a fast layout engine