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

Function initClickTests

test/jasmine/tests/annotations_test.js:1343–1360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1341 }
1342
1343 function initClickTests() {
1344 var gdBB = gd.getBoundingClientRect();
1345 pos0Head = [gdBB.left + 200, gdBB.top + 200];
1346 pos0 = [pos0Head[0], pos0Head[1] - 40];
1347 pos1 = [gdBB.left + 160, gdBB.top + 340];
1348 pos2Head = [gdBB.left + 340, gdBB.top + 160];
1349 pos2 = [pos2Head[0], pos2Head[1] - 40];
1350
1351 clickData = [];
1352
1353 gd.on('plotly_clickannotation', function(evt) {
1354 evt.eventType = evt.event.type;
1355 evt.button = evt.event.button;
1356 if(evt.event.ctrlKey) evt.ctrlKey = true;
1357 delete evt.event;
1358 clickData.push(evt);
1359 });
1360 }
1361
1362 it('should register clicks and show hover effects on the text box only', function(done) {
1363 function assertHoverLabel(pos, text, msg) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…