* Determines if the image requires an orientation change. * * @param {number} [orientation] Defined orientation value * @param {number} [autoOrientation] Auto-orientation based on Exif data * @returns {boolean} Returns true if an orientation change is required
(orientation, autoOrientation)
| 132 | * @returns {boolean} Returns true if an orientation change is required |
| 133 | */ |
| 134 | function requiresOrientationChange(orientation, autoOrientation) { |
| 135 | return ( |
| 136 | orientation !== autoOrientation && |
| 137 | ((orientation === 1 && autoOrientation > 1 && autoOrientation < 9) || |
| 138 | (orientation > 1 && orientation < 9)) |
| 139 | ) |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Determines orientation combinations that require a rotation by 180°. |
no outgoing calls
no test coverage detected