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 (gl3d) v2.13.3
2
+ * plotly.js (gl3d) v2.14.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -36825,6 +36825,10 @@ function draw(gd) {
36825
36825
  }
36826
36826
  }
36827
36827
 
36828
+ function couldHaveActiveSelection(gd) {
36829
+ return gd._context.editSelection;
36830
+ }
36831
+
36828
36832
  function drawOne(gd, index) {
36829
36833
  // remove the existing selection if there is one.
36830
36834
  // because indices can change, we need to look in all selection layers
@@ -36861,7 +36865,7 @@ function drawOne(gd, index) {
36861
36865
  lineDash = 'solid';
36862
36866
  }
36863
36867
 
36864
- var isActiveSelection =
36868
+ var isActiveSelection = couldHaveActiveSelection(gd) &&
36865
36869
  gd._fullLayout._activeSelectionIndex === index;
36866
36870
 
36867
36871
  if(isActiveSelection) {
@@ -36928,6 +36932,8 @@ function setClipPath(selectionPath, gd, selectionOptions) {
36928
36932
 
36929
36933
 
36930
36934
  function activateSelection(gd, path) {
36935
+ if(!couldHaveActiveSelection(gd)) return;
36936
+
36931
36937
  var element = path.node();
36932
36938
  var id = +element.getAttribute('data-index');
36933
36939
  if(id >= 0) {
@@ -36944,6 +36950,8 @@ function activateSelection(gd, path) {
36944
36950
  }
36945
36951
 
36946
36952
  function activateLastSelection(gd) {
36953
+ if(!couldHaveActiveSelection(gd)) return;
36954
+
36947
36955
  var id = gd._fullLayout.selections.length - 1;
36948
36956
  gd._fullLayout._activeSelectionIndex = id;
36949
36957
  gd._fullLayout._deactivateSelection = deactivateSelection;
@@ -36951,6 +36959,8 @@ function activateLastSelection(gd) {
36951
36959
  }
36952
36960
 
36953
36961
  function deactivateSelection(gd) {
36962
+ if(!couldHaveActiveSelection(gd)) return;
36963
+
36954
36964
  var id = gd._fullLayout._activeSelectionIndex;
36955
36965
  if(id >= 0) {
36956
36966
  clearOutlineControllers(gd);
@@ -56411,6 +56421,11 @@ var configAttributes = {
56411
56421
  }
56412
56422
  },
56413
56423
 
56424
+ editSelection: {
56425
+ valType: 'boolean',
56426
+ dflt: true,
56427
+ },
56428
+
56414
56429
  autosizable: {
56415
56430
  valType: 'boolean',
56416
56431
  dflt: false,
@@ -88364,7 +88379,7 @@ function getSortFunc(opts, d2c) {
88364
88379
  'use strict';
88365
88380
 
88366
88381
  // package version injected by `npm run preprocess`
88367
- exports.version = '2.13.3';
88382
+ exports.version = '2.14.0';
88368
88383
 
88369
88384
  },{}],444:[function(_dereq_,module,exports){
88370
88385
  (function (global){(function (){