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

Function assertAxesDrawCalls

test/jasmine/tests/cartesian_interact_test.js:871–889  ·  view source on GitHub ↗
(msg, exp)

Source from the content-addressed store, hash-verified

869 }
870
871 function assertAxesDrawCalls(msg, exp) {
872 var cnt = 0;
873 exp.forEach(function(expi) {
874 var axNames = expi[0];
875 var opts = expi[2] || {};
876 axNames.forEach(function() {
877 if(!opts.noChange) {
878 cnt++;
879 // called twice as many times on drag:
880 // - once per axis during mousemouve
881 // - once per axis on mouseup
882 if(opts.dragged) cnt++;
883 }
884 });
885 });
886
887 expect(Axes.drawOne).toHaveBeenCalledTimes(cnt);
888 Axes.drawOne.calls.reset();
889 }
890
891 function assertSubplotTranslateAndScale(msg, spIds, trans, scale) {
892 var gClips = d3Select(gd).select('g.clips');

Callers 1

_assertFunction · 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…