MCPcopy Create free account
hub / github.com/chartjs/Chart.js / expectHitBoxToCover

Function expectHitBoxToCover

test/specs/plugin.legend.spec.js:982–985  ·  view source on GitHub ↗
(hitbox, symbol, text)

Source from the content-addressed store, hash-verified

980
981 // The hit box runs from the leftmost to the rightmost edge of what is drawn.
982 function expectHitBoxToCover(hitbox, symbol, text) {
983 expect(hitbox.left).toBeCloseTo(Math.min(symbol.left, text.left), 0);
984 expect(hitbox.left + hitbox.width).toBeCloseTo(Math.max(symbol.right, text.right), 0);
985 }
986
987 for (const position of ['left', 'right', 'top', 'bottom']) {
988 for (const textAlign of ['left', 'center', 'right']) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected