In the context of external viewer config and event data, layout means "layout mode". Otherwise, layout means the actual layout object. It's kinda confusing in this function, so I'll add some comments to clarify.