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

Function _runDrag

test/jasmine/tests/cartesian_interact_test.js:98–122  ·  view source on GitHub ↗
(xr0, xr1, yr0, yr1)

Source from the content-addressed store, hash-verified

96 }
97
98 function _runDrag(xr0, xr1, yr0, yr1) {
99 // Drag scene along the X axis
100 _drag(110, 150, 220, 150);
101 _checkAxes(xr1, yr0);
102
103 // Drag scene back along the X axis (not from the same starting point but same X delta)
104 _drag(280, 150, 170, 150);
105 _checkAxes(xr0, yr0);
106
107 // Drag scene along the Y axis
108 _drag(110, 150, 110, 190);
109 _checkAxes(xr0, yr1);
110
111 // Drag scene back along the Y axis (not from the same starting point but same Y delta)
112 _drag(280, 130, 280, 90);
113 _checkAxes(xr0, yr0);
114
115 // Drag scene along both the X and Y axis
116 _drag(110, 150, 220, 190);
117 _checkAxes(xr1, yr1);
118
119 // Drag scene back along the X and Y axis (not from the same starting point but same delta vector)
120 _drag(280, 130, 170, 90);
121 _checkAxes(xr0, yr0);
122 }
123
124 Plotly.newPlot(gd, mock.data, mock.layout).then(function() {
125 modeBar = gd._fullLayout._modeBar;

Callers 1

Calls 2

_checkAxesFunction · 0.85
_dragFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…