MCPcopy
hub / github.com/plotly/plotly.js / clickForTextEdit

Function clickForTextEdit

test/jasmine/tests/annotations_test.js:1551–1568  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

1549
1550 it('should register clicks even in editable:true mode', function(done) {
1551 function clickForTextEdit(pos) {
1552 return new Promise(function(resolve, reject) {
1553 gd.once('plotly_relayout', resolve);
1554
1555 setTimeout(function() {
1556 reject('Did not trigger plotly_relayout');
1557 }, DBLCLICKDELAY * 2);
1558
1559 click(pos[0], pos[1]);
1560
1561 setTimeout(function() {
1562 var input = d3Select('.plugin-editable.editable');
1563 if(input.node()) {
1564 input.node().dispatchEvent(new KeyboardEvent('blur'));
1565 }
1566 }, DBLCLICKDELAY * 1.1);
1567 });
1568 }
1569
1570 makePlot([
1571 {x: 50, y: 50, text: 'hi', width: 50, height: 40, ax: 0, ay: -40, xshift: -50, yshift: 50},

Callers 1

Calls 1

clickFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…