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

Function assertSizeAndThen

test/jasmine/tests/plot_api_test.js:520–532  ·  view source on GitHub ↗
(width, height, auto, msg, next)

Source from the content-addressed store, hash-verified

518
519 it('updates autosize/width/height correctly', function (done) {
520 function assertSizeAndThen(width, height, auto, msg, next) {
521 return function () {
522 expect(gd._fullLayout.width).toBe(width, msg);
523 expect(gd._fullLayout.height).toBe(height, msg);
524 expect(gd._fullLayout.autosize).toBe(auto, msg);
525 if (!auto) {
526 expect(gd.layout.width).toBe(width, msg);
527 expect(gd.layout.height).toBe(height, msg);
528 }
529
530 if (next) return Plotly.relayout(gd, next);
531 };
532 }
533
534 // give gd css sizing to be picked up by autosize
535 gd.style.width = '543px';

Callers 1

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