Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb9e329

Browse files
authored
Merge pull request plotly#1811 from dfcreative/dblclick-deselect
Reset selection by doubleclick
2 parents 5e70d3b + 6cc5eae commit cb9e329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/scattergl/convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ proto.updateFast = function(options) {
401401
this.idToIndex = idToIndex;
402402

403403
// form selected set
404-
if(selection) {
404+
if(selection && selection.length) {
405405
selPositions = new Float64Array(2 * selection.length);
406406

407407
for(i = 0, l = selection.length; i < l; i++) {
@@ -559,7 +559,7 @@ proto.updateFancy = function(options) {
559559

560560
var sizes, selIds;
561561

562-
if(selection) {
562+
if(selection && selection.length) {
563563
selIds = {};
564564
for(i = 0; i < selection.length; i++) {
565565
selIds[selection[i].pointNumber] = true;

0 commit comments

Comments
 (0)