Updated with _layoutElements in Layer