feathersui-openfl
feathersui-openfl copied to clipboard
BaseDividedBox: with more than 2 children, setting the dividerFactory property will remove the third child
From @MatseFR:
I found an issue with BaseDividedBox : if you have more than 2 items in the box and you set the dividerFactory property it will remove the third item. This is because the code doesn't account for the previously removed divider(s) when calculating the next divider's child index. I only have 3 items but I guess more items will currently lead to strange results 🙂
For now I fixed it on my side with a small change to line 220 :
var layoutIndex = i * 2 - (i - 1);