plotly.js 2.13.3 → 2.14.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js v2.13.3
2
+ * plotly.js v2.14.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -68,7 +68,7 @@ exports.topojson = saneTopojson;
68
68
  'use strict';
69
69
 
70
70
  // package version injected by `npm run preprocess`
71
- exports.version = '2.13.3';
71
+ exports.version = '2.14.0';
72
72
 
73
73
  },{}]},{},[16])(16)
74
74
  });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js (geo) v2.13.3
2
+ * plotly.js (geo) v2.14.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -49888,6 +49888,10 @@ function draw(gd) {
49888
49888
  }
49889
49889
  }
49890
49890
 
49891
+ function couldHaveActiveSelection(gd) {
49892
+ return gd._context.editSelection;
49893
+ }
49894
+
49891
49895
  function drawOne(gd, index) {
49892
49896
  // remove the existing selection if there is one.
49893
49897
  // because indices can change, we need to look in all selection layers
@@ -49924,7 +49928,7 @@ function drawOne(gd, index) {
49924
49928
  lineDash = 'solid';
49925
49929
  }
49926
49930
 
49927
- var isActiveSelection =
49931
+ var isActiveSelection = couldHaveActiveSelection(gd) &&
49928
49932
  gd._fullLayout._activeSelectionIndex === index;
49929
49933
 
49930
49934
  if(isActiveSelection) {
@@ -49991,6 +49995,8 @@ function setClipPath(selectionPath, gd, selectionOptions) {
49991
49995
 
49992
49996
 
49993
49997
  function activateSelection(gd, path) {
49998
+ if(!couldHaveActiveSelection(gd)) return;
49999
+
49994
50000
  var element = path.node();
49995
50001
  var id = +element.getAttribute('data-index');
49996
50002
  if(id >= 0) {
@@ -50007,6 +50013,8 @@ function activateSelection(gd, path) {
50007
50013
  }
50008
50014
 
50009
50015
  function activateLastSelection(gd) {
50016
+ if(!couldHaveActiveSelection(gd)) return;
50017
+
50010
50018
  var id = gd._fullLayout.selections.length - 1;
50011
50019
  gd._fullLayout._activeSelectionIndex = id;
50012
50020
  gd._fullLayout._deactivateSelection = deactivateSelection;
@@ -50014,6 +50022,8 @@ function activateLastSelection(gd) {
50014
50022
  }
50015
50023
 
50016
50024
  function deactivateSelection(gd) {
50025
+ if(!couldHaveActiveSelection(gd)) return;
50026
+
50017
50027
  var id = gd._fullLayout._activeSelectionIndex;
50018
50028
  if(id >= 0) {
50019
50029
  clearOutlineControllers(gd);
@@ -69799,6 +69809,11 @@ var configAttributes = {
69799
69809
  }
69800
69810
  },
69801
69811
 
69812
+ editSelection: {
69813
+ valType: 'boolean',
69814
+ dflt: true,
69815
+ },
69816
+
69802
69817
  autosizable: {
69803
69818
  valType: 'boolean',
69804
69819
  dflt: false,
@@ -97455,7 +97470,7 @@ function getSortFunc(opts, d2c) {
97455
97470
  'use strict';
97456
97471
 
97457
97472
  // package version injected by `npm run preprocess`
97458
- exports.version = '2.13.3';
97473
+ exports.version = '2.14.0';
97459
97474
 
97460
97475
  },{}]},{},[8])(8)
97461
97476
  });