MCPcopy Index your code
hub / github.com/blueimp/JavaScript-Load-Image / requiresOrientationChange

Function requiresOrientationChange

js/load-image-orientation.js:134–140  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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°.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected