Added smart flow layout - supports four directions (left, right, up, down) and anchors (left/middle/right, top/middle/bottom).