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

Function fillParent

test/jasmine/tests/config_test.js:691–704  ·  view source on GitHub ↗
(numRows, numCols, cb)

Source from the content-addressed store, hash-verified

689 }
690
691 function fillParent(numRows, numCols, cb) {
692 elWidth = width / numCols, elHeight = height / numRows;
693
694 // Fill parent
695 for(var i = 0; i < (numCols * numRows); i++) {
696 var col = document.createElement('div');
697 col.style.height = '100%';
698 col.style.width = '100%';
699 if(typeof(cb) === typeof(Function)) cb.call(col, i);
700 parent.appendChild(col);
701 }
702 document.body.appendChild(parent);
703 gd = parent.childNodes[0];
704 }
705
706 it('should resize when the viewport width/height changes', function(done) {
707 fillParent(1, 1);

Callers 1

config_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…