plotly.js 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotly.js",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "The open source javascript graphing library that powers plotly",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",
@@ -451,7 +451,6 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
451
451
  dragOptions.doneFnCompleted(selection);
452
452
  }
453
453
 
454
- eventData.selections = gd.layout.selections;
455
454
  emitSelected(gd, eventData);
456
455
  }).catch(Lib.error);
457
456
  };
@@ -530,7 +529,6 @@ function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutli
530
529
  }
531
530
 
532
531
  if(sendEvents) {
533
- eventData.selections = gd.layout.selections;
534
532
  emitSelected(gd, eventData);
535
533
  }
536
534
  }
@@ -1195,7 +1193,6 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
1195
1193
  fillRangeItems(eventData, poly);
1196
1194
  }
1197
1195
 
1198
- eventData.selections = gd.layout.selections;
1199
1196
  emitSelected(gd, eventData);
1200
1197
  }
1201
1198
 
@@ -1216,7 +1213,6 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
1216
1213
 
1217
1214
  if(sendEvents) {
1218
1215
  if(eventData.points.length) {
1219
- eventData.selections = gd.layout.selections;
1220
1216
  emitSelected(gd, eventData);
1221
1217
  } else {
1222
1218
  gd.emit('plotly_deselect', null);
@@ -1507,14 +1503,22 @@ function getFillRangeItems(dragOptions) {
1507
1503
  }
1508
1504
 
1509
1505
  function emitSelecting(gd, eventData) {
1506
+ if(drawMode(gd._fullLayout.dragmode)) return;
1510
1507
  gd.emit('plotly_selecting', eventData);
1511
1508
  }
1512
1509
 
1513
1510
  function emitSelected(gd, eventData) {
1511
+ if(drawMode(gd._fullLayout.dragmode)) return;
1512
+
1513
+ if(eventData) {
1514
+ eventData.selections = (gd.layout || {}).selections || [];
1515
+ }
1516
+
1514
1517
  gd.emit('plotly_selected', eventData);
1515
1518
  }
1516
1519
 
1517
1520
  function emitDeselect(gd) {
1521
+ if(drawMode(gd._fullLayout.dragmode)) return;
1518
1522
  gd.emit('plotly_deselect', null);
1519
1523
  }
1520
1524
 
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
3
  // package version injected by `npm run preprocess`
4
- exports.version = '2.13.0';
4
+ exports.version = '2.13.1';