plotly.js 2.13.2 → 2.13.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 +6 -0
- package/README.md +3 -3
- package/dist/README.md +25 -25
- package/dist/plotly-basic.js +36 -15
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +36 -15
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +36 -15
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +36 -15
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +36 -15
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +36 -15
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-mapbox.js +36 -15
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +36 -15
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +36 -15
- package/dist/plotly.js +36 -15
- package/dist/plotly.min.js +2 -2
- package/package.json +1 -1
- package/src/components/selections/select.js +24 -12
- package/src/plots/plots.js +10 -1
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,12 @@ 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.13.3] -- 2022-07-25
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Emit plotly_selected event on plot API calls and GUI edits [[#6277](https://github.com/plotly/plotly.js/pull/6277)]
|
|
16
|
+
|
|
17
|
+
|
|
12
18
|
## [2.13.2] -- 2022-07-21
|
|
13
19
|
|
|
14
20
|
### 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.13.
|
|
58
|
+
<script src="https://cdn.plot.ly/plotly-2.13.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.13.
|
|
75
|
+
import "https://cdn.plot.ly/plotly-2.13.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.13.
|
|
85
|
+
<script src="https://cdn.plot.ly/plotly-2.13.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.4 MB | 3.5 MB | 1 MB | 8.7 MB |
|
|
47
47
|
|
|
48
48
|
#### CDN links
|
|
49
|
-
> https://cdn.plot.ly/plotly-2.13.
|
|
49
|
+
> https://cdn.plot.ly/plotly-2.13.3.js
|
|
50
50
|
|
|
51
|
-
> https://cdn.plot.ly/plotly-2.13.
|
|
51
|
+
> https://cdn.plot.ly/plotly-2.13.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 |
|
|
94
|
+
| 2.7 MB | 998.2 kB | 324.6 kB |
|
|
95
95
|
|
|
96
96
|
#### CDN links
|
|
97
|
-
> https://cdn.plot.ly/plotly-basic-2.13.
|
|
97
|
+
> https://cdn.plot.ly/plotly-basic-2.13.3.js
|
|
98
98
|
|
|
99
|
-
> https://cdn.plot.ly/plotly-basic-2.13.
|
|
99
|
+
> https://cdn.plot.ly/plotly-basic-2.13.3.min.js
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
#### npm packages
|
|
@@ -114,12 +114,12 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
|
|
|
114
114
|
|
|
115
115
|
| Raw size | Minified size | Minified + gzip size |
|
|
116
116
|
|------|-----------------|------------------------|
|
|
117
|
-
| 3.4 MB | 1.2 MB | 397.
|
|
117
|
+
| 3.4 MB | 1.2 MB | 397.7 kB |
|
|
118
118
|
|
|
119
119
|
#### CDN links
|
|
120
|
-
> https://cdn.plot.ly/plotly-cartesian-2.13.
|
|
120
|
+
> https://cdn.plot.ly/plotly-cartesian-2.13.3.js
|
|
121
121
|
|
|
122
|
-
> https://cdn.plot.ly/plotly-cartesian-2.13.
|
|
122
|
+
> https://cdn.plot.ly/plotly-cartesian-2.13.3.min.js
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
#### npm packages
|
|
@@ -137,12 +137,12 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
|
|
|
137
137
|
|
|
138
138
|
| Raw size | Minified size | Minified + gzip size |
|
|
139
139
|
|------|-----------------|------------------------|
|
|
140
|
-
| 3.1 MB | 1.1 MB | 367.
|
|
140
|
+
| 3.1 MB | 1.1 MB | 367.3 kB |
|
|
141
141
|
|
|
142
142
|
#### CDN links
|
|
143
|
-
> https://cdn.plot.ly/plotly-geo-2.13.
|
|
143
|
+
> https://cdn.plot.ly/plotly-geo-2.13.3.js
|
|
144
144
|
|
|
145
|
-
> https://cdn.plot.ly/plotly-geo-2.13.
|
|
145
|
+
> https://cdn.plot.ly/plotly-geo-2.13.3.min.js
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
#### npm packages
|
|
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
|
|
|
160
160
|
|
|
161
161
|
| Raw size | Minified size | Minified + gzip size |
|
|
162
162
|
|------|-----------------|------------------------|
|
|
163
|
-
| 3.9 MB | 1.5 MB | 488.
|
|
163
|
+
| 3.9 MB | 1.5 MB | 488.4 kB |
|
|
164
164
|
|
|
165
165
|
#### CDN links
|
|
166
|
-
> https://cdn.plot.ly/plotly-gl3d-2.13.
|
|
166
|
+
> https://cdn.plot.ly/plotly-gl3d-2.13.3.js
|
|
167
167
|
|
|
168
|
-
> https://cdn.plot.ly/plotly-gl3d-2.13.
|
|
168
|
+
> https://cdn.plot.ly/plotly-gl3d-2.13.3.min.js
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
#### npm packages
|
|
@@ -183,12 +183,12 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
|
|
|
183
183
|
|
|
184
184
|
| Raw size | Minified size | Minified + gzip size |
|
|
185
185
|
|------|-----------------|------------------------|
|
|
186
|
-
| 4.4 MB | 1.8 MB | 580.
|
|
186
|
+
| 4.4 MB | 1.8 MB | 580.6 kB |
|
|
187
187
|
|
|
188
188
|
#### CDN links
|
|
189
|
-
> https://cdn.plot.ly/plotly-gl2d-2.13.
|
|
189
|
+
> https://cdn.plot.ly/plotly-gl2d-2.13.3.js
|
|
190
190
|
|
|
191
|
-
> https://cdn.plot.ly/plotly-gl2d-2.13.
|
|
191
|
+
> https://cdn.plot.ly/plotly-gl2d-2.13.3.min.js
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
#### npm packages
|
|
@@ -206,12 +206,12 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
|
|
|
206
206
|
|
|
207
207
|
| Raw size | Minified size | Minified + gzip size |
|
|
208
208
|
|------|-----------------|------------------------|
|
|
209
|
-
| 4.4 MB | 1.7 MB | 521.
|
|
209
|
+
| 4.4 MB | 1.7 MB | 521.5 kB |
|
|
210
210
|
|
|
211
211
|
#### CDN links
|
|
212
|
-
> https://cdn.plot.ly/plotly-mapbox-2.13.
|
|
212
|
+
> https://cdn.plot.ly/plotly-mapbox-2.13.3.js
|
|
213
213
|
|
|
214
|
-
> https://cdn.plot.ly/plotly-mapbox-2.13.
|
|
214
|
+
> https://cdn.plot.ly/plotly-mapbox-2.13.3.min.js
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
#### npm packages
|
|
@@ -229,12 +229,12 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
|
|
|
229
229
|
|
|
230
230
|
| Raw size | Minified size | Minified + gzip size |
|
|
231
231
|
|------|-----------------|------------------------|
|
|
232
|
-
| 3 MB | 1.1 MB | 357.
|
|
232
|
+
| 3 MB | 1.1 MB | 357.3 kB |
|
|
233
233
|
|
|
234
234
|
#### CDN links
|
|
235
|
-
> https://cdn.plot.ly/plotly-finance-2.13.
|
|
235
|
+
> https://cdn.plot.ly/plotly-finance-2.13.3.js
|
|
236
236
|
|
|
237
|
-
> https://cdn.plot.ly/plotly-finance-2.13.
|
|
237
|
+
> https://cdn.plot.ly/plotly-finance-2.13.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
|
| 8.8 MB | 3.9 MB | 1.1 MB |
|
|
256
256
|
|
|
257
257
|
#### CDN links
|
|
258
|
-
> https://cdn.plot.ly/plotly-strict-2.13.
|
|
258
|
+
> https://cdn.plot.ly/plotly-strict-2.13.3.js
|
|
259
259
|
|
|
260
|
-
> https://cdn.plot.ly/plotly-strict-2.13.
|
|
260
|
+
> https://cdn.plot.ly/plotly-strict-2.13.3.min.js
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
#### npm packages
|
package/dist/plotly-basic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (basic) v2.13.
|
|
2
|
+
* plotly.js (basic) v2.13.3
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -36716,6 +36716,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
36716
36716
|
}
|
|
36717
36717
|
|
|
36718
36718
|
if(selectionErased) {
|
|
36719
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
36720
|
+
|
|
36719
36721
|
Registry.call('_guiRelayout', gd, {
|
|
36720
36722
|
selections: list
|
|
36721
36723
|
});
|
|
@@ -36857,10 +36859,10 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
36857
36859
|
displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
|
|
36858
36860
|
|
|
36859
36861
|
if(isSelectMode) {
|
|
36860
|
-
var _res = reselect(gd);
|
|
36862
|
+
var _res = reselect(gd, false);
|
|
36861
36863
|
var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
|
|
36862
36864
|
|
|
36863
|
-
_res = reselect(gd, selectionTesters, searchTraces, dragOptions);
|
|
36865
|
+
_res = reselect(gd, false, selectionTesters, searchTraces, dragOptions);
|
|
36864
36866
|
selectionTesters = _res.selectionTesters;
|
|
36865
36867
|
eventData = _res.eventData;
|
|
36866
36868
|
|
|
@@ -36954,9 +36956,13 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
36954
36956
|
}
|
|
36955
36957
|
}
|
|
36956
36958
|
|
|
36957
|
-
|
|
36958
|
-
|
|
36959
|
-
|
|
36959
|
+
if(subSelections.length < allSelections.length) {
|
|
36960
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
36961
|
+
|
|
36962
|
+
Registry.call('_guiRelayout', gd, {
|
|
36963
|
+
selections: subSelections
|
|
36964
|
+
});
|
|
36965
|
+
}
|
|
36960
36966
|
}
|
|
36961
36967
|
}
|
|
36962
36968
|
} else {
|
|
@@ -37275,6 +37281,8 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
|
37275
37281
|
selections = newSelections(outlines, dragOptions);
|
|
37276
37282
|
}
|
|
37277
37283
|
if(selections) {
|
|
37284
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
37285
|
+
|
|
37278
37286
|
Registry.call('_guiRelayout', gd, {
|
|
37279
37287
|
selections: selections
|
|
37280
37288
|
}).then(function() {
|
|
@@ -37612,7 +37620,7 @@ function _doSelect(selectionTesters, searchTraces) {
|
|
|
37612
37620
|
return allSelections;
|
|
37613
37621
|
}
|
|
37614
37622
|
|
|
37615
|
-
function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
37623
|
+
function reselect(gd, mayEmitSelected, selectionTesters, searchTraces, dragOptions) {
|
|
37616
37624
|
var hadSearchTraces = !!searchTraces;
|
|
37617
37625
|
var plotinfo, xRef, yRef;
|
|
37618
37626
|
if(dragOptions) {
|
|
@@ -37735,15 +37743,15 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
37735
37743
|
updateSelectedState(gd, allSearchTraces, eventData);
|
|
37736
37744
|
|
|
37737
37745
|
var clickmode = fullLayout.clickmode;
|
|
37738
|
-
var sendEvents = clickmode.indexOf('event') > -1;
|
|
37746
|
+
var sendEvents = clickmode.indexOf('event') > -1 && mayEmitSelected;
|
|
37739
37747
|
|
|
37740
37748
|
if(
|
|
37741
37749
|
!plotinfo && // get called from plot_api & plots
|
|
37742
|
-
|
|
37750
|
+
mayEmitSelected
|
|
37743
37751
|
) {
|
|
37744
|
-
|
|
37745
|
-
var activePolygons = getLayoutPolygons(gd, true);
|
|
37752
|
+
var activePolygons = getLayoutPolygons(gd, true);
|
|
37746
37753
|
|
|
37754
|
+
if(activePolygons.length) {
|
|
37747
37755
|
var xref = activePolygons[0].xref;
|
|
37748
37756
|
var yref = activePolygons[0].yref;
|
|
37749
37757
|
if(xref && yref) {
|
|
@@ -37756,8 +37764,12 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
37756
37764
|
|
|
37757
37765
|
fillRangeItems(eventData, poly);
|
|
37758
37766
|
}
|
|
37767
|
+
}
|
|
37759
37768
|
|
|
37760
|
-
|
|
37769
|
+
if(gd._fullLayout._noEmitSelectedAtStart) {
|
|
37770
|
+
gd._fullLayout._noEmitSelectedAtStart = false;
|
|
37771
|
+
} else {
|
|
37772
|
+
if(sendEvents) emitSelected(gd, eventData);
|
|
37761
37773
|
}
|
|
37762
37774
|
|
|
37763
37775
|
fullLayout._reselect = false;
|
|
@@ -37779,7 +37791,7 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
37779
37791
|
if(eventData.points.length) {
|
|
37780
37792
|
emitSelected(gd, eventData);
|
|
37781
37793
|
} else {
|
|
37782
|
-
gd
|
|
37794
|
+
emitDeselect(gd);
|
|
37783
37795
|
}
|
|
37784
37796
|
}
|
|
37785
37797
|
|
|
@@ -74526,7 +74538,16 @@ plots.redrag = function(gd) {
|
|
|
74526
74538
|
};
|
|
74527
74539
|
|
|
74528
74540
|
plots.reselect = function(gd) {
|
|
74529
|
-
|
|
74541
|
+
var fullLayout = gd._fullLayout;
|
|
74542
|
+
|
|
74543
|
+
var A = (gd.layout || {}).selections;
|
|
74544
|
+
var B = fullLayout._previousSelections;
|
|
74545
|
+
fullLayout._previousSelections = A;
|
|
74546
|
+
|
|
74547
|
+
var mayEmitSelected = fullLayout._reselect ||
|
|
74548
|
+
JSON.stringify(A) !== JSON.stringify(B);
|
|
74549
|
+
|
|
74550
|
+
Registry.getComponentMethod('selections', 'reselect')(gd, mayEmitSelected);
|
|
74530
74551
|
};
|
|
74531
74552
|
|
|
74532
74553
|
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
|
|
@@ -84688,7 +84709,7 @@ function getSortFunc(opts, d2c) {
|
|
|
84688
84709
|
'use strict';
|
|
84689
84710
|
|
|
84690
84711
|
// package version injected by `npm run preprocess`
|
|
84691
|
-
exports.version = '2.13.
|
|
84712
|
+
exports.version = '2.13.3';
|
|
84692
84713
|
|
|
84693
84714
|
},{}]},{},[8])(8)
|
|
84694
84715
|
});
|