beforeLayout event added