You don't need to re-detect layoutMode; it's passed as an argument to the hasCrossedBreakpoint callback fn.