improve EDimension to avoid isHorizontal and use an enum
fix bug not showing add empty box
improve usage of Dimension