MCPcopy Index your code
hub / github.com/plotly/plotly.js / checkPositions

Function checkPositions

test/jasmine/tests/sliders_test.js:336–349  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

334
335 it('positions sliders repeatably when they push margins', function(done) {
336 function checkPositions(msg) {
337 d3Select(gd).selectAll('.slider-group').each(function(d, i) {
338 var sliderBB = this.getBoundingClientRect();
339 var gdBB = gd.getBoundingClientRect();
340
341 if(i === 0) {
342 expect(sliderBB.left - gdBB.left)
343 .toBeWithin(12, 5.1, 'left: ' + msg);
344 } else {
345 expect(gdBB.bottom - sliderBB.bottom)
346 .toBeWithin(8, 5.1, 'bottom: ' + msg);
347 }
348 });
349 }
350
351 checkPositions('initial');
352

Callers 1

sliders_test.jsFile · 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…