(bar)
| 71 | } |
| 72 | |
| 73 | function boundingRects(bar) { |
| 74 | const bounds = getBarBounds(bar); |
| 75 | const width = bounds.right - bounds.left; |
| 76 | const height = bounds.bottom - bounds.top; |
| 77 | const border = parseBorderWidth(bar, width / 2, height / 2); |
| 78 | const radius = parseBorderRadius(bar, width / 2, height / 2); |
| 79 | |
| 80 | return { |
| 81 | outer: { |
| 82 | x: bounds.left, |
| 83 | y: bounds.top, |
| 84 | w: width, |
| 85 | h: height, |
| 86 | radius |
| 87 | }, |
| 88 | inner: { |
| 89 | x: bounds.left + border.l, |
| 90 | y: bounds.top + border.t, |
| 91 | w: width - border.l - border.r, |
| 92 | h: height - border.t - border.b, |
| 93 | radius: { |
| 94 | topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)), |
| 95 | topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)), |
| 96 | bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)), |
| 97 | bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r)), |
| 98 | } |
| 99 | } |
| 100 | }; |
| 101 | } |
| 102 | |
| 103 | function inRange(bar, x, y, useFinalPosition) { |
| 104 | const skipX = x === null; |
no test coverage detected