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 (finance) v2.13.3
2
+ * plotly.js (finance) v2.14.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -37355,6 +37355,10 @@ function draw(gd) {
37355
37355
  }
37356
37356
  }
37357
37357
 
37358
+ function couldHaveActiveSelection(gd) {
37359
+ return gd._context.editSelection;
37360
+ }
37361
+
37358
37362
  function drawOne(gd, index) {
37359
37363
  // remove the existing selection if there is one.
37360
37364
  // because indices can change, we need to look in all selection layers
@@ -37391,7 +37395,7 @@ function drawOne(gd, index) {
37391
37395
  lineDash = 'solid';
37392
37396
  }
37393
37397
 
37394
- var isActiveSelection =
37398
+ var isActiveSelection = couldHaveActiveSelection(gd) &&
37395
37399
  gd._fullLayout._activeSelectionIndex === index;
37396
37400
 
37397
37401
  if(isActiveSelection) {
@@ -37458,6 +37462,8 @@ function setClipPath(selectionPath, gd, selectionOptions) {
37458
37462
 
37459
37463
 
37460
37464
  function activateSelection(gd, path) {
37465
+ if(!couldHaveActiveSelection(gd)) return;
37466
+
37461
37467
  var element = path.node();
37462
37468
  var id = +element.getAttribute('data-index');
37463
37469
  if(id >= 0) {
@@ -37474,6 +37480,8 @@ function activateSelection(gd, path) {
37474
37480
  }
37475
37481
 
37476
37482
  function activateLastSelection(gd) {
37483
+ if(!couldHaveActiveSelection(gd)) return;
37484
+
37477
37485
  var id = gd._fullLayout.selections.length - 1;
37478
37486
  gd._fullLayout._activeSelectionIndex = id;
37479
37487
  gd._fullLayout._deactivateSelection = deactivateSelection;
@@ -37481,6 +37489,8 @@ function activateLastSelection(gd) {
37481
37489
  }
37482
37490
 
37483
37491
  function deactivateSelection(gd) {
37492
+ if(!couldHaveActiveSelection(gd)) return;
37493
+
37484
37494
  var id = gd._fullLayout._activeSelectionIndex;
37485
37495
  if(id >= 0) {
37486
37496
  clearOutlineControllers(gd);
@@ -56769,6 +56779,11 @@ var configAttributes = {
56769
56779
  }
56770
56780
  },
56771
56781
 
56782
+ editSelection: {
56783
+ valType: 'boolean',
56784
+ dflt: true,
56785
+ },
56786
+
56772
56787
  autosizable: {
56773
56788
  valType: 'boolean',
56774
56789
  dflt: false,
@@ -92712,7 +92727,7 @@ function getSortFunc(opts, d2c) {
92712
92727
  'use strict';
92713
92728
 
92714
92729
  // package version injected by `npm run preprocess`
92715
- exports.version = '2.13.3';
92730
+ exports.version = '2.14.0';
92716
92731
 
92717
92732
  },{}]},{},[12])(12)
92718
92733
  });