Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions src/components/legend/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ function clickOrDoubleClick(gd, legend, legendItem, numClicks, evt) {
evtData.label = legendItem.datum()[0].label;
}

var clickVal = Events.triggerHandler(gd, 'plotly_legendclick', evtData);
if(clickVal === false) return;

if(numClicks === 1) {
var clickVal = Events.triggerHandler(gd, 'plotly_legendclick', evtData);
if(clickVal === false) return;

legend._clickTimeout = setTimeout(function() {
if(!gd._fullLayout) return;
handleClick(legendItem, gd, numClicks);
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/legend_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@ describe('legend with custom doubleClickDelay', function() {
.then(_assert('[long] after click + (t/2) delay', 1, 0))
.then(delay(tLong + 10))
.then(click(0)).then(delay(DBLCLICKDELAY + 1)).then(click(0))
.then(_assert('[long] after click + (DBLCLICKDELAY+1) delay + click', 2, 1))
.then(_assert('[long] after click + (DBLCLICKDELAY+1) delay + click', 1, 1))
.then(delay(tLong + 10))
.then(click(0)).then(delay(1.1 * tLong)).then(click(0))
.then(_assert('[long] after click + (1.1*t) delay + click', 2, 0))
Expand Down