setup "layout-complete" event