(bar, maxW, maxH)
| 52 | } |
| 53 | |
| 54 | function parseBorderRadius(bar, maxW, maxH) { |
| 55 | const {enableBorderRadius} = bar.getProps(['enableBorderRadius']); |
| 56 | const value = bar.options.borderRadius; |
| 57 | const o = toTRBLCorners(value); |
| 58 | const maxR = Math.min(maxW, maxH); |
| 59 | const skip = bar.borderSkipped; |
| 60 | |
| 61 | // If the value is an object, assume the user knows what they are doing |
| 62 | // and apply as directed. |
| 63 | const enableBorder = enableBorderRadius || isObject(value); |
| 64 | |
| 65 | return { |
| 66 | topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR), |
| 67 | topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR), |
| 68 | bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR), |
| 69 | bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR) |
| 70 | }; |
| 71 | } |
| 72 | |
| 73 | function boundingRects(bar) { |
| 74 | const bounds = getBarBounds(bar); |
no test coverage detected