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

Function testResponsive

test/jasmine/tests/config_test.js:673–689  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

671 }
672
673 function testResponsive() {
674 checkLayoutSize(elWidth, elHeight);
675 viewport.set(width / 2, height / 2);
676
677 return Promise.resolve()
678 .then(delay(RESIZE_DELAY))
679 .then(function() {
680 checkLayoutSize(elWidth / 2, elHeight / 2);
681
682 var mainSvgs = document.getElementsByClassName('main-svg');
683 checkElementsSize(mainSvgs, elWidth / 2, elHeight / 2);
684
685 var canvases = document.getElementsByTagName('canvas');
686 checkCanvasSize(canvases, elWidth / 2, elHeight / 2);
687 })
688 .catch(failTest);
689 }
690
691 function fillParent(numRows, numCols, cb) {
692 elWidth = width / numCols, elHeight = height / numRows;

Callers

nothing calls this directly

Calls 3

checkLayoutSizeFunction · 0.85
checkElementsSizeFunction · 0.85
checkCanvasSizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…