plotly.js 3.0.0-rc.1 → 3.0.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,6 +1,6 @@
1
1
  /**
2
- * plotly.js (mapbox) v3.0.0-rc.1
3
- * Copyright 2012-2024, Plotly, Inc.
2
+ * plotly.js (mapbox) v3.0.0
3
+ * Copyright 2012-2025, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
6
6
  */
@@ -38,7 +38,7 @@ var Plotly = (() => {
38
38
  var require_version = __commonJS({
39
39
  "src/version.js"(exports) {
40
40
  "use strict";
41
- exports.version = "3.0.0-rc.1";
41
+ exports.version = "3.0.0";
42
42
  }
43
43
  });
44
44
 
@@ -12768,11 +12768,14 @@ var Plotly = (() => {
12768
12768
  var style = document.getElementById(id);
12769
12769
  if (style) removeElement(style);
12770
12770
  }
12771
- function setStyleOnHover(selector, activeSelector, childSelector, activeStyle, inactiveStyle) {
12771
+ function setStyleOnHover(selector, activeSelector, childSelector, activeStyle, inactiveStyle, element) {
12772
12772
  var activeStyleParts = activeStyle.split(":");
12773
12773
  var inactiveStyleParts = inactiveStyle.split(":");
12774
12774
  var eventAddedAttrName = "data-btn-style-event-added";
12775
- document.querySelectorAll(selector).forEach(function(el) {
12775
+ if (!element) {
12776
+ element = document;
12777
+ }
12778
+ element.querySelectorAll(selector).forEach(function(el) {
12776
12779
  if (!el.getAttribute(eventAddedAttrName)) {
12777
12780
  el.addEventListener("mouseenter", function() {
12778
12781
  var childEl = this.querySelector(childSelector);
@@ -13734,10 +13737,10 @@ var Plotly = (() => {
13734
13737
  }
13735
13738
  });
13736
13739
 
13737
- // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css
13740
+ // stylePlugin:/Users/alex/plotly/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css
13738
13741
  var maplibre_gl_exports = {};
13739
13742
  var init_maplibre_gl2 = __esm({
13740
- "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() {
13743
+ "stylePlugin:/Users/alex/plotly/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() {
13741
13744
  init_maplibre_gl();
13742
13745
  }
13743
13746
  });
@@ -22700,8 +22703,10 @@ var Plotly = (() => {
22700
22703
  pointData.distance = 0;
22701
22704
  } else pointData.index = false;
22702
22705
  } else {
22703
- for (var i = 0; i < cd.length; i++) {
22704
- var newDistance = distfn(cd[i]);
22706
+ var newDistance = Infinity;
22707
+ var len = cd.length;
22708
+ for (var i = 0; i < len; i++) {
22709
+ newDistance = distfn(cd[i]);
22705
22710
  if (newDistance <= pointData.distance) {
22706
22711
  pointData.index = i;
22707
22712
  pointData.distance = newDistance;
@@ -37152,7 +37157,6 @@ var Plotly = (() => {
37152
37157
  document.querySelectorAll(groupSelector).forEach(function(group) {
37153
37158
  group.style.backgroundColor = style.bgcolor;
37154
37159
  });
37155
- Lib.setStyleOnHover("#" + modeBarId + " .modebar-btn", ".active", ".icon path", "fill: " + style.activecolor, "fill: " + style.color);
37156
37160
  var needsNewButtons = !this.hasButtons(buttons);
37157
37161
  var needsNewLogo = this.hasLogo !== context.displaylogo;
37158
37162
  var needsNewLocale = this.locale !== context.locale;
@@ -37174,6 +37178,7 @@ var Plotly = (() => {
37174
37178
  }
37175
37179
  }
37176
37180
  this.updateActiveButton();
37181
+ Lib.setStyleOnHover("#" + modeBarId + " .modebar-btn", ".active", ".icon path", "fill: " + style.activecolor, "fill: " + style.color, this.element);
37177
37182
  };
37178
37183
  proto.updateButtons = function(buttons) {
37179
37184
  var _this = this;
@@ -46390,7 +46395,10 @@ var Plotly = (() => {
46390
46395
  fullLayout._calcInverseTransform = calcInverseTransform;
46391
46396
  fullLayout._calcInverseTransform(gd);
46392
46397
  fullLayout._container = gd3.selectAll(".plot-container").data([0]);
46393
- fullLayout._container.enter().insert("div", ":first-child").classed("plot-container", true).classed("plotly", true);
46398
+ fullLayout._container.enter().insert("div", ":first-child").classed("plot-container", true).classed("plotly", true).style({
46399
+ width: "100%",
46400
+ height: "100%"
46401
+ });
46394
46402
  fullLayout._paperdiv = fullLayout._container.selectAll(".svg-container").data([0]);
46395
46403
  fullLayout._paperdiv.enter().append("div").classed("user-select-none", true).classed("svg-container", true).style("position", "relative");
46396
46404
  fullLayout._glcontainer = fullLayout._paperdiv.selectAll(".gl-container").data([{}]);