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

Function toggle

test/jasmine/tests/ternary_test.js:431–445  ·  view source on GitHub ↗
(selector, astr, vals, exps)

Source from the content-addressed store, hash-verified

429 }
430
431 function toggle(selector, astr, vals, exps) {
432 return function() {
433 return Plotly.relayout(gd, astr, vals[0]).then(function() {
434 assertCnt(selector, exps[0], astr + ' ' + vals[0]);
435 return Plotly.relayout(gd, astr, vals[1]);
436 })
437 .then(function() {
438 assertCnt(selector, exps[1], astr + ' ' + vals[1]);
439 return Plotly.relayout(gd, astr, vals[0]);
440 })
441 .then(function() {
442 assertCnt(selector, exps[0], astr + ' ' + vals[0]);
443 });
444 };
445 }
446
447 Plotly.newPlot(gd, fig)
448 .then(toggle(

Callers 1

ternary_test.jsFile · 0.70

Calls 1

assertCntFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…