plotly.js 2.6.2 → 2.6.3

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.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ To see all merged commits on the master branch that will be part of the next plo
9
9
 
10
10
  where X.Y.Z is the semver of most recent plotly.js release.
11
11
 
12
+ ## [2.6.3] -- 2021-11-12
13
+
14
+ ### Fixed
15
+ - Fix hover events in Shadow DOM [[#6021](https://github.com/plotly/plotly.js/pull/6021)],
16
+ with thanks to @SabineWren for the contribution!
17
+
18
+
12
19
  ## [2.6.2] -- 2021-11-05
13
20
 
14
21
  ### Fixed
package/README.md CHANGED
@@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
55
55
 
56
56
  ```html
57
57
  <head>
58
- <script src="https://cdn.plot.ly/plotly-2.6.2.min.js"></script>
58
+ <script src="https://cdn.plot.ly/plotly-2.6.3.min.js"></script>
59
59
  </head>
60
60
  <body>
61
61
  <div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
72
72
  Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
73
73
  ```html
74
74
  <script type="module">
75
- import "https://cdn.plot.ly/plotly-2.6.2.min.js"
75
+ import "https://cdn.plot.ly/plotly-2.6.3.min.js"
76
76
  Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
77
77
  </script>
78
78
  ```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
82
82
  ### Un-minified versions are also available on CDN
83
83
  While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
84
84
  ```html
85
- <script src="https://cdn.plot.ly/plotly-2.6.2.js" charset="utf-8"></script>
85
+ <script src="https://cdn.plot.ly/plotly-2.6.3.js" charset="utf-8"></script>
86
86
  ```
87
87
 
88
88
  > Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
package/dist/README.md CHANGED
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
46
46
  | 8.3 MB | 3.5 MB | 1 MB | 8.6 MB |
47
47
 
48
48
  #### CDN links
49
- > https://cdn.plot.ly/plotly-2.6.2.js
49
+ > https://cdn.plot.ly/plotly-2.6.3.js
50
50
 
51
- > https://cdn.plot.ly/plotly-2.6.2.min.js
51
+ > https://cdn.plot.ly/plotly-2.6.3.min.js
52
52
 
53
53
 
54
54
  #### npm packages
@@ -91,12 +91,12 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
91
91
 
92
92
  | Raw size | Minified size | Minified + gzip size |
93
93
  |------|-----------------|------------------------|
94
- | 2.7 MB | 973.4 kB | 316.7 kB |
94
+ | 2.7 MB | 973.2 kB | 316.7 kB |
95
95
 
96
96
  #### CDN links
97
- > https://cdn.plot.ly/plotly-basic-2.6.2.js
97
+ > https://cdn.plot.ly/plotly-basic-2.6.3.js
98
98
 
99
- > https://cdn.plot.ly/plotly-basic-2.6.2.min.js
99
+ > https://cdn.plot.ly/plotly-basic-2.6.3.min.js
100
100
 
101
101
 
102
102
  #### npm packages
@@ -117,9 +117,9 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
117
117
  | 3.3 MB | 1.2 MB | 388.2 kB |
118
118
 
119
119
  #### CDN links
120
- > https://cdn.plot.ly/plotly-cartesian-2.6.2.js
120
+ > https://cdn.plot.ly/plotly-cartesian-2.6.3.js
121
121
 
122
- > https://cdn.plot.ly/plotly-cartesian-2.6.2.min.js
122
+ > https://cdn.plot.ly/plotly-cartesian-2.6.3.min.js
123
123
 
124
124
 
125
125
  #### npm packages
@@ -140,9 +140,9 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
140
140
  | 3 MB | 1.1 MB | 359.5 kB |
141
141
 
142
142
  #### CDN links
143
- > https://cdn.plot.ly/plotly-geo-2.6.2.js
143
+ > https://cdn.plot.ly/plotly-geo-2.6.3.js
144
144
 
145
- > https://cdn.plot.ly/plotly-geo-2.6.2.min.js
145
+ > https://cdn.plot.ly/plotly-geo-2.6.3.min.js
146
146
 
147
147
 
148
148
  #### npm packages
@@ -163,9 +163,9 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
163
163
  | 3.8 MB | 1.5 MB | 479.6 kB |
164
164
 
165
165
  #### CDN links
166
- > https://cdn.plot.ly/plotly-gl3d-2.6.2.js
166
+ > https://cdn.plot.ly/plotly-gl3d-2.6.3.js
167
167
 
168
- > https://cdn.plot.ly/plotly-gl3d-2.6.2.min.js
168
+ > https://cdn.plot.ly/plotly-gl3d-2.6.3.min.js
169
169
 
170
170
 
171
171
  #### npm packages
@@ -186,9 +186,9 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
186
186
  | 4.3 MB | 1.8 MB | 570.1 kB |
187
187
 
188
188
  #### CDN links
189
- > https://cdn.plot.ly/plotly-gl2d-2.6.2.js
189
+ > https://cdn.plot.ly/plotly-gl2d-2.6.3.js
190
190
 
191
- > https://cdn.plot.ly/plotly-gl2d-2.6.2.min.js
191
+ > https://cdn.plot.ly/plotly-gl2d-2.6.3.min.js
192
192
 
193
193
 
194
194
  #### npm packages
@@ -209,9 +209,9 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
209
209
  | 4.3 MB | 1.7 MB | 513.7 kB |
210
210
 
211
211
  #### CDN links
212
- > https://cdn.plot.ly/plotly-mapbox-2.6.2.js
212
+ > https://cdn.plot.ly/plotly-mapbox-2.6.3.js
213
213
 
214
- > https://cdn.plot.ly/plotly-mapbox-2.6.2.min.js
214
+ > https://cdn.plot.ly/plotly-mapbox-2.6.3.min.js
215
215
 
216
216
 
217
217
  #### npm packages
@@ -232,9 +232,9 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
232
232
  | 2.9 MB | 1.1 MB | 349.3 kB |
233
233
 
234
234
  #### CDN links
235
- > https://cdn.plot.ly/plotly-finance-2.6.2.js
235
+ > https://cdn.plot.ly/plotly-finance-2.6.3.js
236
236
 
237
- > https://cdn.plot.ly/plotly-finance-2.6.2.min.js
237
+ > https://cdn.plot.ly/plotly-finance-2.6.3.min.js
238
238
 
239
239
 
240
240
  #### npm packages
@@ -255,9 +255,9 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
255
255
  | 7.7 MB | 3.2 MB | 956 kB |
256
256
 
257
257
  #### CDN links
258
- > https://cdn.plot.ly/plotly-strict-2.6.2.js
258
+ > https://cdn.plot.ly/plotly-strict-2.6.3.js
259
259
 
260
- > https://cdn.plot.ly/plotly-strict-2.6.2.min.js
260
+ > https://cdn.plot.ly/plotly-strict-2.6.3.min.js
261
261
 
262
262
 
263
263
  #### npm packages
@@ -1,5 +1,5 @@
1
1
  /**
2
- * plotly.js (basic) v2.6.2
2
+ * plotly.js (basic) v2.6.3
3
3
  * Copyright 2012-2021, Plotly, Inc.
4
4
  * All rights reserved.
5
5
  * Licensed under the MIT license
@@ -21963,6 +21963,19 @@ function makeColorBarData(gd) {
21963
21963
  }
21964
21964
 
21965
21965
  function drawColorBar(g, opts, gd) {
21966
+ var len = opts.len;
21967
+ var lenmode = opts.lenmode;
21968
+ var thickness = opts.thickness;
21969
+ var thicknessmode = opts.thicknessmode;
21970
+ var outlinewidth = opts.outlinewidth;
21971
+ var borderwidth = opts.borderwidth;
21972
+ var xanchor = opts.xanchor;
21973
+ var yanchor = opts.yanchor;
21974
+ var xpad = opts.xpad;
21975
+ var ypad = opts.ypad;
21976
+ var optsX = opts.x;
21977
+ var optsY = opts.y;
21978
+
21966
21979
  var fullLayout = gd._fullLayout;
21967
21980
  var gs = fullLayout._size;
21968
21981
 
@@ -21992,42 +22005,41 @@ function drawColorBar(g, opts, gd) {
21992
22005
  // when the colorbar itself is pushing the margins.
21993
22006
  // but then the fractional size is calculated based on the
21994
22007
  // actual graph size, so that the axes will size correctly.
21995
- var thickPx = Math.round(opts.thickness * (opts.thicknessmode === 'fraction' ? gs.w : 1));
22008
+ var thickPx = Math.round(thickness * (thicknessmode === 'fraction' ? gs.w : 1));
21996
22009
  var thickFrac = thickPx / gs.w;
21997
- var lenPx = Math.round(opts.len * (opts.lenmode === 'fraction' ? gs.h : 1));
22010
+ var lenPx = Math.round(len * (lenmode === 'fraction' ? gs.h : 1));
21998
22011
  var lenFrac = lenPx / gs.h;
21999
- var xpadFrac = opts.xpad / gs.w;
22000
- var yExtraPx = (opts.borderwidth + opts.outlinewidth) / 2;
22001
- var ypadFrac = opts.ypad / gs.h;
22012
+ var xpadFrac = xpad / gs.w;
22013
+ var yExtraPx = (borderwidth + outlinewidth) / 2;
22014
+ var ypadFrac = ypad / gs.h;
22002
22015
 
22003
22016
  // x positioning: do it initially just for left anchor,
22004
22017
  // then fix at the end (since we don't know the width yet)
22005
- var xLeft = Math.round(opts.x * gs.w + opts.xpad);
22018
+ var uPx = Math.round(optsX * gs.w + xpad);
22006
22019
  // for dragging... this is getting a little muddled...
22007
- var xLeftFrac = opts.x - thickFrac * ({center: 0.5, right: 1}[opts.xanchor] || 0);
22020
+ var uFrac = optsX - thickFrac * ({center: 0.5, right: 1}[xanchor] || 0);
22008
22021
 
22009
22022
  // y positioning we can do correctly from the start
22010
- var yBottomFrac = opts.y + lenFrac * (({top: -0.5, bottom: 0.5}[opts.yanchor] || 0) - 0.5);
22011
- var yBottomPx = Math.round(gs.h * (1 - yBottomFrac));
22012
- var yTopPx = yBottomPx - lenPx;
22023
+ var vFrac = optsY + lenFrac * (({top: -0.5, bottom: 0.5}[yanchor] || 0) - 0.5);
22024
+ var vPx = Math.round(gs.h * (1 - vFrac));
22013
22025
 
22014
22026
  // stash a few things for makeEditable
22015
22027
  opts._lenFrac = lenFrac;
22016
22028
  opts._thickFrac = thickFrac;
22017
- opts._xLeftFrac = xLeftFrac;
22018
- opts._yBottomFrac = yBottomFrac;
22029
+ opts._uFrac = uFrac;
22030
+ opts._vFrac = vFrac;
22019
22031
 
22020
22032
  // stash mocked axis for contour label formatting
22021
22033
  var ax = opts._axis = mockColorBarAxis(gd, opts, zrange);
22022
22034
 
22023
22035
  // position can't go in through supplyDefaults
22024
22036
  // because that restricts it to [0,1]
22025
- ax.position = opts.x + xpadFrac + thickFrac;
22037
+ ax.position = optsX + xpadFrac + thickFrac;
22026
22038
 
22027
22039
  if(['top', 'bottom'].indexOf(titleSide) !== -1) {
22028
22040
  ax.title.side = titleSide;
22029
- ax.titlex = opts.x + xpadFrac;
22030
- ax.titley = yBottomFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);
22041
+ ax.titlex = optsX + xpadFrac;
22042
+ ax.titley = vFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);
22031
22043
  }
22032
22044
 
22033
22045
  if(line.color && opts.tickmode === 'auto') {
@@ -22035,7 +22047,7 @@ function drawColorBar(g, opts, gd) {
22035
22047
  ax.tick0 = levelsIn.start;
22036
22048
  var dtick = levelsIn.size;
22037
22049
  // expand if too many contours, so we don't get too many ticks
22038
- var autoNtick = Lib.constrain((yBottomPx - yTopPx) / 50, 4, 15) + 1;
22050
+ var autoNtick = Lib.constrain(lenPx / 50, 4, 15) + 1;
22039
22051
  var dtFactor = (zrange[1] - zrange[0]) / ((opts.nticks || autoNtick) * dtick);
22040
22052
  if(dtFactor > 1) {
22041
22053
  var dtexp = Math.pow(10, Math.floor(Math.log(dtFactor) / Math.LN10));
@@ -22053,8 +22065,8 @@ function drawColorBar(g, opts, gd) {
22053
22065
  // set domain after init, because we may want to
22054
22066
  // allow it outside [0,1]
22055
22067
  ax.domain = [
22056
- yBottomFrac + ypadFrac,
22057
- yBottomFrac + lenFrac - ypadFrac
22068
+ vFrac + ypadFrac,
22069
+ vFrac + lenFrac - ypadFrac
22058
22070
  ];
22059
22071
 
22060
22072
  ax.setScale();
@@ -22095,15 +22107,15 @@ function drawColorBar(g, opts, gd) {
22095
22107
  // draw the title so we know how much room it needs
22096
22108
  // when we squish the axis. This one only applies to
22097
22109
  // top or bottom titles, not right side.
22098
- var x = gs.l + (opts.x + xpadFrac) * gs.w;
22110
+ var x = gs.l + (optsX + xpadFrac) * gs.w;
22099
22111
  var fontSize = ax.title.font.size;
22100
22112
  var y;
22101
22113
 
22102
22114
  if(titleSide === 'top') {
22103
- y = (1 - (yBottomFrac + lenFrac - ypadFrac)) * gs.h +
22115
+ y = (1 - (vFrac + lenFrac - ypadFrac)) * gs.h +
22104
22116
  gs.t + 3 + fontSize * 0.75;
22105
22117
  } else {
22106
- y = (1 - (yBottomFrac + ypadFrac)) * gs.h +
22118
+ y = (1 - (vFrac + ypadFrac)) * gs.h +
22107
22119
  gs.t - 3 - fontSize * 0.25;
22108
22120
  }
22109
22121
  drawTitle(ax._id + 'title', {
@@ -22142,7 +22154,7 @@ function drawColorBar(g, opts, gd) {
22142
22154
  // squish the axis top to make room for the title
22143
22155
  var titleGroup = g.select('.' + cn.cbtitle);
22144
22156
  var titleText = titleGroup.select('text');
22145
- var titleTrans = [-opts.outlinewidth / 2, opts.outlinewidth / 2];
22157
+ var titleTrans = [-outlinewidth / 2, outlinewidth / 2];
22146
22158
  var mathJaxNode = titleGroup
22147
22159
  .select('.h' + ax._id + 'title-math-group')
22148
22160
  .node();
@@ -22214,7 +22226,7 @@ function drawColorBar(g, opts, gd) {
22214
22226
  // Colorbar cannot currently support opacities so we
22215
22227
  // use an opaque fill even when alpha channels present
22216
22228
  var fillEl = d3.select(this).attr({
22217
- x: xLeft,
22229
+ x: uPx,
22218
22230
  width: Math.max(thickPx, 2),
22219
22231
  y: d3.min(z),
22220
22232
  height: Math.max(d3.max(z) - d3.min(z), 2),
@@ -22238,7 +22250,7 @@ function drawColorBar(g, opts, gd) {
22238
22250
  lines.exit().remove();
22239
22251
  lines.each(function(d) {
22240
22252
  d3.select(this)
22241
- .attr('d', 'M' + xLeft + ',' +
22253
+ .attr('d', 'M' + uPx + ',' +
22242
22254
  (Math.round(ax.c2p(d)) + (line.width / 2) % 1) + 'h' + thickPx)
22243
22255
  .call(Drawing.lineGroupStyle, line.width, lineColormap(d), line.dash);
22244
22256
  });
@@ -22246,8 +22258,8 @@ function drawColorBar(g, opts, gd) {
22246
22258
  // force full redraw of labels and ticks
22247
22259
  axLayer.selectAll('g.' + ax._id + 'tick,path').remove();
22248
22260
 
22249
- var shift = xLeft + thickPx +
22250
- (opts.outlinewidth || 0) / 2 - (opts.ticks === 'outside' ? 1 : 0);
22261
+ var shift = uPx + thickPx +
22262
+ (outlinewidth || 0) / 2 - (opts.ticks === 'outside' ? 1 : 0);
22251
22263
 
22252
22264
  var vals = Axes.calcTicks(ax);
22253
22265
  var tickSign = Axes.getTickSigns(ax)[2];
@@ -22272,9 +22284,9 @@ function drawColorBar(g, opts, gd) {
22272
22284
  // TODO: why are we redrawing multiple times now with this?
22273
22285
  // I guess autoMargin doesn't like being post-promise?
22274
22286
  function positionCB() {
22275
- var innerWidth = thickPx + opts.outlinewidth / 2;
22287
+ var innerThickness = thickPx + outlinewidth / 2;
22276
22288
  if(ax.ticklabelposition.indexOf('inside') === -1) {
22277
- innerWidth += Drawing.bBox(axLayer.node()).width;
22289
+ innerThickness += Drawing.bBox(axLayer.node()).width;
22278
22290
  }
22279
22291
 
22280
22292
  titleEl = titleCont.select('text');
@@ -22289,66 +22301,65 @@ function drawColorBar(g, opts, gd) {
22289
22301
  // (except for top/bottom mathjax, above)
22290
22302
  // but the weird gs.l is because the titleunshift
22291
22303
  // transform gets removed by Drawing.bBox
22292
- titleWidth = Drawing.bBox(titleCont.node()).right - xLeft - gs.l;
22304
+ titleWidth = Drawing.bBox(titleCont.node()).right - uPx - gs.l;
22293
22305
  }
22294
- innerWidth = Math.max(innerWidth, titleWidth);
22306
+ innerThickness = Math.max(innerThickness, titleWidth);
22295
22307
  }
22296
22308
 
22297
- var outerwidth = 2 * opts.xpad + innerWidth + opts.borderwidth + opts.outlinewidth / 2;
22298
- var outerheight = yBottomPx - yTopPx;
22309
+ var outerThickness = 2 * xpad + innerThickness + borderwidth + outlinewidth / 2;
22299
22310
 
22300
22311
  g.select('.' + cn.cbbg).attr({
22301
- x: xLeft - opts.xpad - (opts.borderwidth + opts.outlinewidth) / 2,
22302
- y: yTopPx - yExtraPx,
22303
- width: Math.max(outerwidth, 2),
22304
- height: Math.max(outerheight + 2 * yExtraPx, 2)
22312
+ x: uPx - xpad - (borderwidth + outlinewidth) / 2,
22313
+ y: vPx - lenPx - yExtraPx,
22314
+ width: Math.max(outerThickness, 2),
22315
+ height: Math.max(lenPx + 2 * yExtraPx, 2)
22305
22316
  })
22306
22317
  .call(Color.fill, opts.bgcolor)
22307
22318
  .call(Color.stroke, opts.bordercolor)
22308
- .style('stroke-width', opts.borderwidth);
22319
+ .style('stroke-width', borderwidth);
22309
22320
 
22310
22321
  g.selectAll('.' + cn.cboutline).attr({
22311
- x: xLeft,
22312
- y: yTopPx + opts.ypad + (titleSide === 'top' ? titleHeight : 0),
22322
+ x: uPx,
22323
+ y: vPx - lenPx + ypad + (titleSide === 'top' ? titleHeight : 0),
22313
22324
  width: Math.max(thickPx, 2),
22314
- height: Math.max(outerheight - 2 * opts.ypad - titleHeight, 2)
22325
+ height: Math.max(lenPx - 2 * ypad - titleHeight, 2)
22315
22326
  })
22316
22327
  .call(Color.stroke, opts.outlinecolor)
22317
22328
  .style({
22318
22329
  fill: 'none',
22319
- 'stroke-width': opts.outlinewidth
22330
+ 'stroke-width': outlinewidth
22320
22331
  });
22321
22332
 
22322
22333
  // fix positioning for xanchor!='left'
22323
- var xoffset = ({center: 0.5, right: 1}[opts.xanchor] || 0) * outerwidth;
22334
+ var xoffset = ({center: 0.5, right: 1}[xanchor] || 0) * outerThickness;
22324
22335
  g.attr('transform', strTranslate(gs.l - xoffset, gs.t));
22325
22336
 
22326
22337
  // auto margin adjustment
22327
22338
  var marginOpts = {};
22328
- var tFrac = FROM_TL[opts.yanchor];
22329
- var bFrac = FROM_BR[opts.yanchor];
22330
- if(opts.lenmode === 'pixels') {
22331
- marginOpts.y = opts.y;
22332
- marginOpts.t = outerheight * tFrac;
22333
- marginOpts.b = outerheight * bFrac;
22339
+ var tFrac = FROM_TL[yanchor];
22340
+ var bFrac = FROM_BR[yanchor];
22341
+ if(lenmode === 'pixels') {
22342
+ marginOpts.y = optsY;
22343
+ marginOpts.t = lenPx * tFrac;
22344
+ marginOpts.b = lenPx * bFrac;
22334
22345
  } else {
22335
22346
  marginOpts.t = marginOpts.b = 0;
22336
- marginOpts.yt = opts.y + opts.len * tFrac;
22337
- marginOpts.yb = opts.y - opts.len * bFrac;
22347
+ marginOpts.yt = optsY + len * tFrac;
22348
+ marginOpts.yb = optsY - len * bFrac;
22338
22349
  }
22339
22350
 
22340
- var lFrac = FROM_TL[opts.xanchor];
22341
- var rFrac = FROM_BR[opts.xanchor];
22342
- if(opts.thicknessmode === 'pixels') {
22343
- marginOpts.x = opts.x;
22344
- marginOpts.l = outerwidth * lFrac;
22345
- marginOpts.r = outerwidth * rFrac;
22351
+ var lFrac = FROM_TL[xanchor];
22352
+ var rFrac = FROM_BR[xanchor];
22353
+ if(thicknessmode === 'pixels') {
22354
+ marginOpts.x = optsX;
22355
+ marginOpts.l = outerThickness * lFrac;
22356
+ marginOpts.r = outerThickness * rFrac;
22346
22357
  } else {
22347
- var extraThickness = outerwidth - thickPx;
22358
+ var extraThickness = outerThickness - thickPx;
22348
22359
  marginOpts.l = extraThickness * lFrac;
22349
22360
  marginOpts.r = extraThickness * rFrac;
22350
- marginOpts.xl = opts.x - opts.thickness * lFrac;
22351
- marginOpts.xr = opts.x + opts.thickness * rFrac;
22361
+ marginOpts.xl = optsX - thickness * lFrac;
22362
+ marginOpts.xr = optsX + thickness * rFrac;
22352
22363
  }
22353
22364
 
22354
22365
  Plots.autoMargin(gd, opts._id, marginOpts);
@@ -22379,9 +22390,9 @@ function makeEditable(g, opts, gd) {
22379
22390
  moveFn: function(dx, dy) {
22380
22391
  g.attr('transform', t0 + strTranslate(dx, dy));
22381
22392
 
22382
- xf = dragElement.align(opts._xLeftFrac + (dx / gs.w), opts._thickFrac,
22393
+ xf = dragElement.align(opts._uFrac + (dx / gs.w), opts._thickFrac,
22383
22394
  0, 1, opts.xanchor);
22384
- yf = dragElement.align(opts._yBottomFrac - (dy / gs.h), opts._lenFrac,
22395
+ yf = dragElement.align(opts._vFrac - (dy / gs.h), opts._lenFrac,
22385
22396
  0, 1, opts.yanchor);
22386
22397
 
22387
22398
  var csr = dragElement.getCursor(xf, yf, opts.xanchor, opts.yanchor);
@@ -27083,11 +27094,13 @@ var cartesianScatterPoints = {
27083
27094
  // The actual rendering is done by private function _hover.
27084
27095
  exports.hover = function hover(gd, evt, subplot, noHoverEvent) {
27085
27096
  gd = Lib.getGraphDiv(gd);
27086
-
27097
+ // The 'target' property changes when bubbling out of Shadow DOM.
27098
+ // Throttling can delay reading the target, so we save the current value.
27099
+ var eventTarget = evt.target;
27087
27100
  Lib.throttle(
27088
27101
  gd._fullLayout._uid + constants.HOVERID,
27089
27102
  constants.HOVERMINTIME,
27090
- function() { _hover(gd, evt, subplot, noHoverEvent); }
27103
+ function() { _hover(gd, evt, subplot, noHoverEvent, eventTarget); }
27091
27104
  );
27092
27105
  };
27093
27106
 
@@ -27252,7 +27265,7 @@ exports.loneHover = function loneHover(hoverItems, opts) {
27252
27265
  };
27253
27266
 
27254
27267
  // The actual implementation is here:
27255
- function _hover(gd, evt, subplot, noHoverEvent) {
27268
+ function _hover(gd, evt, subplot, noHoverEvent, eventTarget) {
27256
27269
  if(!subplot) subplot = 'xy';
27257
27270
 
27258
27271
  // if the user passed in an array of subplots,
@@ -27371,7 +27384,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
27371
27384
  // [x|y]px: the pixels (from top left) of the mouse location
27372
27385
  // on the currently selected plot area
27373
27386
  // add pointerX|Y property for drawing the spikes in spikesnap 'cursor' situation
27374
- var hasUserCalledHover = !evt.target;
27387
+ var hasUserCalledHover = !eventTarget;
27375
27388
  var xpx, ypx;
27376
27389
 
27377
27390
  if(hasUserCalledHover) {
@@ -27388,13 +27401,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
27388
27401
  return;
27389
27402
  }
27390
27403
 
27391
- // Discover event target, traversing open shadow roots.
27392
- var target = evt.composedPath && evt.composedPath()[0];
27393
- if(!target) {
27394
- // Fallback for browsers not supporting composedPath
27395
- target = evt.target;
27396
- }
27397
- var dbb = target.getBoundingClientRect();
27404
+ var dbb = eventTarget.getBoundingClientRect();
27398
27405
 
27399
27406
  xpx = evt.clientX - dbb.left;
27400
27407
  ypx = evt.clientY - dbb.top;
@@ -27842,15 +27849,15 @@ function _hover(gd, evt, subplot, noHoverEvent) {
27842
27849
  if(!helpers.isUnifiedHover(hovermode)) {
27843
27850
  hoverAvoidOverlaps(hoverLabels, rotateLabels ? 'xa' : 'ya', fullLayout);
27844
27851
  alignHoverText(hoverLabels, rotateLabels, fullLayout._invScaleX, fullLayout._invScaleY);
27845
- } // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true
27852
+ } // TODO: tagName hack is needed to appease geo.js's hack of using eventTarget=true
27846
27853
  // we should improve the "fx" API so other plots can use it without these hack.
27847
- if(evt.target && evt.target.tagName) {
27854
+ if(eventTarget && eventTarget.tagName) {
27848
27855
  var hasClickToShow = Registry.getComponentMethod('annotations', 'hasClickToShow')(gd, newhoverdata);
27849
- overrideCursor(d3.select(evt.target), hasClickToShow ? 'pointer' : '');
27856
+ overrideCursor(d3.select(eventTarget), hasClickToShow ? 'pointer' : '');
27850
27857
  }
27851
27858
 
27852
27859
  // don't emit events if called manually
27853
- if(!evt.target || noHoverEvent || !hoverChanged(gd, evt, oldhoverdata)) return;
27860
+ if(!eventTarget || noHoverEvent || !hoverChanged(gd, evt, oldhoverdata)) return;
27854
27861
 
27855
27862
  if(oldhoverdata) {
27856
27863
  gd.emit('plotly_unhover', {
@@ -82281,7 +82288,7 @@ function getSortFunc(opts, d2c) {
82281
82288
  'use strict';
82282
82289
 
82283
82290
  // package version injected by `npm run preprocess`
82284
- exports.version = '2.6.2';
82291
+ exports.version = '2.6.3';
82285
82292
 
82286
82293
  },{}]},{},[8])(8)
82287
82294
  });