MCPcopy
hub / github.com/plotly/plotly.js / checkBBox

Function checkBBox

test/jasmine/tests/domain_ref_interact_test.js:30–39  ·  view source on GitHub ↗
(bboxBefore, bboxAfter, moveX, moveY)

Source from the content-addressed store, hash-verified

28// }
29
30function checkBBox(bboxBefore, bboxAfter, moveX, moveY) {
31 // We print out the objects for sanity, because sometimes Jasmine says a
32 // test passed when it actually did nothing!
33 // console.log('bboxBefore', svgRectToJSON(bboxBefore));
34 // console.log('bboxAfter', svgRectToJSON(bboxAfter));
35 // console.log('moveX', moveX);
36 // console.log('moveY', moveY);
37 expect(bboxAfter.x).toBeCloseTo(bboxBefore.x + moveX, 2);
38 expect(bboxAfter.y).toBeCloseTo(bboxBefore.y + moveY, 2);
39}
40
41function testObjectMove(objectColor, moveX, moveY, type) {
42 var bboxBefore = getSVGElemScreenBBox(

Callers 3

testObjectMoveFunction · 0.85
testAnnotationMoveLabelFunction · 0.85
testAnnotationMoveWholeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…