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

Function testAnnotationCombo

test/jasmine/assets/domain_ref_components.js:677–714  ·  view source on GitHub ↗
(combo, assert, gd)

Source from the content-addressed store, hash-verified

675}
676
677function testAnnotationCombo(combo, assert, gd) {
678 var axistypex = combo[0];
679 var axistypey = combo[1];
680 var axispair = combo[2];
681 var aroposx = combo[3];
682 var aroposy = combo[4];
683 var arrowaxispair = combo[5];
684 var xid = axispair[0];
685 var yid = axispair[1];
686 var xref = makeAxRef(xid, aroposx.ref);
687 var yref = makeAxRef(yid, aroposy.ref);
688 var axref = arrowaxispair[0] === 'p' ? 'pixel' : xref;
689 var ayref = arrowaxispair[1] === 'p' ? 'pixel' : yref;
690 var x0 = aroposx.value[0];
691 var y0 = aroposy.value[0];
692 var ax = axref === 'pixel' ? aroposx.pixel : aroposx.value[1];
693 var ay = ayref === 'pixel' ? aroposy.pixel : aroposy.value[1];
694 return Plotly.newPlot(gd, Lib.extendDeep({}, testMock))
695 .then(function(gd) {
696 return annotationTest(gd, {},
697 {
698 x0: x0,
699 y0: y0,
700 ax: ax,
701 ay: ay,
702 xref: xref,
703 yref: yref,
704 axref: axref,
705 ayref: ayref,
706 axistypex: axistypex,
707 axistypey: axistypey,
708 xid: xid,
709 yid: yid,
710 });
711 }).then(function(testRet) {
712 assert(testRet);
713 });
714}
715
716// return a list of functions, each returning a promise that executes a
717// particular test. This function takes the keepGraphDiv argument, which if true

Callers

nothing calls this directly

Calls 3

makeAxRefFunction · 0.85
annotationTestFunction · 0.85
assertFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…