adding _calculateLeftOffset, modifying 'flip' so that it can take 'auto', 'left', or 'right'; defaults to 'right', existing behavior.