Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/annotations/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function drawOne(gd, index) {
gd.emit('plotly_clickannotation', {
index: index,
annotation: optionsIn,
fullAnnotation: options
fullAnnotation: options,
event: d3.event
});
});

Expand Down
6 changes: 5 additions & 1 deletion test/jasmine/tests/annotations_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,11 @@ describe('annotation effects', function() {
], {}) // turn off the default editable: true
.then(function() {
clickData = [];
gd.on('plotly_clickannotation', function(evt) { clickData.push(evt); });
gd.on('plotly_clickannotation', function(evt) {
expect(evt.event).toEqual(jasmine.objectContaining({type: 'click'}));
delete evt.event;
clickData.push(evt);
});

gdBB = gd.getBoundingClientRect();
pos0Head = [gdBB.left + 200, gdBB.top + 200];
Expand Down