Function
defaultClip
(xScale, yScale, allowedOverflow)
Source from the content-addressed store, hash-verified
| 21 | } |
| 22 | |
| 23 | function defaultClip(xScale, yScale, allowedOverflow) { |
| 24 | if (allowedOverflow === false) { |
| 25 | return false; |
| 26 | } |
| 27 | const x = scaleClip(xScale, allowedOverflow); |
| 28 | const y = scaleClip(yScale, allowedOverflow); |
| 29 | |
| 30 | return { |
| 31 | top: y.end, |
| 32 | right: x.end, |
| 33 | bottom: y.start, |
| 34 | left: x.start |
| 35 | }; |
| 36 | } |
| 37 | |
| 38 | function toClip(value) { |
| 39 | let t, r, b, l; |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…