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 (gl2d) v2.13.3
2
+ * plotly.js (gl2d) v2.14.0
3
3
  * Copyright 2012-2022, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -49603,6 +49603,10 @@ function draw(gd) {
49603
49603
  }
49604
49604
  }
49605
49605
 
49606
+ function couldHaveActiveSelection(gd) {
49607
+ return gd._context.editSelection;
49608
+ }
49609
+
49606
49610
  function drawOne(gd, index) {
49607
49611
  // remove the existing selection if there is one.
49608
49612
  // because indices can change, we need to look in all selection layers
@@ -49639,7 +49643,7 @@ function drawOne(gd, index) {
49639
49643
  lineDash = 'solid';
49640
49644
  }
49641
49645
 
49642
- var isActiveSelection =
49646
+ var isActiveSelection = couldHaveActiveSelection(gd) &&
49643
49647
  gd._fullLayout._activeSelectionIndex === index;
49644
49648
 
49645
49649
  if(isActiveSelection) {
@@ -49706,6 +49710,8 @@ function setClipPath(selectionPath, gd, selectionOptions) {
49706
49710
 
49707
49711
 
49708
49712
  function activateSelection(gd, path) {
49713
+ if(!couldHaveActiveSelection(gd)) return;
49714
+
49709
49715
  var element = path.node();
49710
49716
  var id = +element.getAttribute('data-index');
49711
49717
  if(id >= 0) {
@@ -49722,6 +49728,8 @@ function activateSelection(gd, path) {
49722
49728
  }
49723
49729
 
49724
49730
  function activateLastSelection(gd) {
49731
+ if(!couldHaveActiveSelection(gd)) return;
49732
+
49725
49733
  var id = gd._fullLayout.selections.length - 1;
49726
49734
  gd._fullLayout._activeSelectionIndex = id;
49727
49735
  gd._fullLayout._deactivateSelection = deactivateSelection;
@@ -49729,6 +49737,8 @@ function activateLastSelection(gd) {
49729
49737
  }
49730
49738
 
49731
49739
  function deactivateSelection(gd) {
49740
+ if(!couldHaveActiveSelection(gd)) return;
49741
+
49732
49742
  var id = gd._fullLayout._activeSelectionIndex;
49733
49743
  if(id >= 0) {
49734
49744
  clearOutlineControllers(gd);
@@ -69261,6 +69271,11 @@ var configAttributes = {
69261
69271
  }
69262
69272
  },
69263
69273
 
69274
+ editSelection: {
69275
+ valType: 'boolean',
69276
+ dflt: true,
69277
+ },
69278
+
69264
69279
  autosizable: {
69265
69280
  valType: 'boolean',
69266
69281
  dflt: false,
@@ -103053,7 +103068,7 @@ function getSortFunc(opts, d2c) {
103053
103068
  'use strict';
103054
103069
 
103055
103070
  // package version injected by `npm run preprocess`
103056
- exports.version = '2.13.3';
103071
+ exports.version = '2.14.0';
103057
103072
 
103058
103073
  },{}],600:[function(_dereq_,module,exports){
103059
103074
  (function (global){(function (){