* Calculates if out of bounds or pinned in the X direction. * * @param {number} left * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom] * @param {number} width * @param pin * @param pinned * @param {string[]} oob * @return {number} * @private
(left, bounds, width, pin, pinned, oob)
| 95 | * @private |
| 96 | */ |
| 97 | function _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob) { |
| 98 | if (left < bounds[0]) { |
| 99 | if (pin.indexOf('left') >= 0) { |
| 100 | left = bounds[0]; |
| 101 | pinned.push('left'); |
| 102 | } else { |
| 103 | oob.push('left'); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | if (left + width > bounds[2]) { |
| 108 | if (pin.indexOf('right') >= 0) { |
| 109 | left = bounds[2] - width; |
| 110 | pinned.push('right'); |
| 111 | } else { |
| 112 | oob.push('right'); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | return left; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Calculates if out of bounds or pinned in the Y direction. |
no outgoing calls
no test coverage detected
searching dependent graphs…