Skip to content

Commit 28835f7

Browse files
committed
2.13.2
1 parent dfac79d commit 28835f7

24 files changed

+377
-194
lines changed

Diff for: dist/README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ The main plotly.js bundles weight in at:
4646
| 8.4 MB | 3.5 MB | 1 MB | 8.7 MB |
4747

4848
#### CDN links
49-
> https://cdn.plot.ly/plotly-2.13.1.js
49+
> https://cdn.plot.ly/plotly-2.13.2.js
5050
51-
> https://cdn.plot.ly/plotly-2.13.1.min.js
51+
> https://cdn.plot.ly/plotly-2.13.2.min.js
5252
5353

5454
#### npm packages
@@ -94,9 +94,9 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`.
9494
| 2.7 MB | 997.9 kB | 324.5 kB |
9595

9696
#### CDN links
97-
> https://cdn.plot.ly/plotly-basic-2.13.1.js
97+
> https://cdn.plot.ly/plotly-basic-2.13.2.js
9898
99-
> https://cdn.plot.ly/plotly-basic-2.13.1.min.js
99+
> https://cdn.plot.ly/plotly-basic-2.13.2.min.js
100100
101101

102102
#### npm packages
@@ -117,9 +117,9 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, `
117117
| 3.4 MB | 1.2 MB | 397.6 kB |
118118

119119
#### CDN links
120-
> https://cdn.plot.ly/plotly-cartesian-2.13.1.js
120+
> https://cdn.plot.ly/plotly-cartesian-2.13.2.js
121121
122-
> https://cdn.plot.ly/plotly-cartesian-2.13.1.min.js
122+
> https://cdn.plot.ly/plotly-cartesian-2.13.2.min.js
123123
124124

125125
#### npm packages
@@ -140,9 +140,9 @@ The `geo` partial bundle contains trace modules `choropleth`, `scatter` and `sca
140140
| 3.1 MB | 1.1 MB | 367.2 kB |
141141

142142
#### CDN links
143-
> https://cdn.plot.ly/plotly-geo-2.13.1.js
143+
> https://cdn.plot.ly/plotly-geo-2.13.2.js
144144
145-
> https://cdn.plot.ly/plotly-geo-2.13.1.min.js
145+
> https://cdn.plot.ly/plotly-geo-2.13.2.min.js
146146
147147

148148
#### npm packages
@@ -160,12 +160,12 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`,
160160

161161
| Raw size | Minified size | Minified + gzip size |
162162
|------|-----------------|------------------------|
163-
| 3.9 MB | 1.5 MB | 488.2 kB |
163+
| 3.9 MB | 1.5 MB | 488.3 kB |
164164

165165
#### CDN links
166-
> https://cdn.plot.ly/plotly-gl3d-2.13.1.js
166+
> https://cdn.plot.ly/plotly-gl3d-2.13.2.js
167167
168-
> https://cdn.plot.ly/plotly-gl3d-2.13.1.min.js
168+
> https://cdn.plot.ly/plotly-gl3d-2.13.2.min.js
169169
170170

171171
#### npm packages
@@ -186,9 +186,9 @@ The `gl2d` partial bundle contains trace modules `heatmapgl`, `parcoords`, `poin
186186
| 4.4 MB | 1.8 MB | 580.5 kB |
187187

188188
#### CDN links
189-
> https://cdn.plot.ly/plotly-gl2d-2.13.1.js
189+
> https://cdn.plot.ly/plotly-gl2d-2.13.2.js
190190
191-
> https://cdn.plot.ly/plotly-gl2d-2.13.1.min.js
191+
> https://cdn.plot.ly/plotly-gl2d-2.13.2.min.js
192192
193193

194194
#### npm packages
@@ -209,9 +209,9 @@ The `mapbox` partial bundle contains trace modules `choroplethmapbox`, `densitym
209209
| 4.4 MB | 1.7 MB | 521.4 kB |
210210

211211
#### CDN links
212-
> https://cdn.plot.ly/plotly-mapbox-2.13.1.js
212+
> https://cdn.plot.ly/plotly-mapbox-2.13.2.js
213213
214-
> https://cdn.plot.ly/plotly-mapbox-2.13.1.min.js
214+
> https://cdn.plot.ly/plotly-mapbox-2.13.2.min.js
215215
216216

217217
#### npm packages
@@ -232,9 +232,9 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne
232232
| 3 MB | 1.1 MB | 357.2 kB |
233233

234234
#### CDN links
235-
> https://cdn.plot.ly/plotly-finance-2.13.1.js
235+
> https://cdn.plot.ly/plotly-finance-2.13.2.js
236236
237-
> https://cdn.plot.ly/plotly-finance-2.13.1.min.js
237+
> https://cdn.plot.ly/plotly-finance-2.13.2.min.js
238238
239239

240240
#### npm packages
@@ -252,12 +252,12 @@ The `strict` partial bundle contains trace modules `bar`, `barpolar`, `box`, `ca
252252

253253
| Raw size | Minified size | Minified + gzip size |
254254
|------|-----------------|------------------------|
255-
| 8.8 MB | 3.8 MB | 1.1 MB |
255+
| 8.8 MB | 3.9 MB | 1.1 MB |
256256

257257
#### CDN links
258-
> https://cdn.plot.ly/plotly-strict-2.13.1.js
258+
> https://cdn.plot.ly/plotly-strict-2.13.2.js
259259
260-
> https://cdn.plot.ly/plotly-strict-2.13.1.min.js
260+
> https://cdn.plot.ly/plotly-strict-2.13.2.min.js
261261
262262

263263
#### npm packages

Diff for: dist/plotly-basic.js

+33-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (basic) v2.13.1
2+
* plotly.js (basic) v2.13.2
33
* Copyright 2012-2022, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -36592,7 +36592,14 @@ var p2r = helpers.p2r;
3659236592
var axValue = helpers.axValue;
3659336593
var getTransform = helpers.getTransform;
3659436594

36595+
function hasSubplot(dragOptions) {
36596+
// N.B. subplot may be falsy e.g zero sankey index!
36597+
return dragOptions.subplot !== undefined;
36598+
}
36599+
3659536600
function prepSelect(evt, startX, startY, dragOptions, mode) {
36601+
var isCartesian = !hasSubplot(dragOptions);
36602+
3659636603
var isFreeMode = freeMode(mode);
3659736604
var isRectMode = rectMode(mode);
3659836605
var isOpenMode = openMode(mode);
@@ -36606,7 +36613,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
3660636613
var gd = dragOptions.gd;
3660736614
var fullLayout = gd._fullLayout;
3660836615
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
36609-
!dragOptions.subplot; // N.B. only cartesian subplots have persistent selection
36616+
isCartesian; // N.B. only cartesian subplots have persistent selection
3661036617

3661136618
var zoomLayer = fullLayout._zoomlayer;
3661236619
var dragBBox = dragOptions.element.getBoundingClientRect();
@@ -36654,9 +36661,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
3665436661
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
3665536662
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
3665636663
stroke: newStyle.line.color || (
36657-
dragOptions.subplot !== undefined ?
36658-
'#7f7f7f' : // non-cartesian subplot
36659-
Color.contrast(gd._fullLayout.plot_bgcolor) // cartesian subplot
36664+
isCartesian ?
36665+
Color.contrast(gd._fullLayout.plot_bgcolor) :
36666+
'#7f7f7f' // non-cartesian subplot
3666036667
),
3666136668
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
3666236669
'stroke-width': newStyle.line.width + 'px',
@@ -36687,6 +36694,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
3668736694

3668836695
if(immediateSelect && !evt.shiftKey) {
3668936696
dragOptions._clearSubplotSelections = function() {
36697+
if(!isCartesian) return;
36698+
3669036699
var xRef = xAxis._id;
3669136700
var yRef = yAxis._id;
3669236701
deselectSubplot(gd, xRef, yRef, searchTraces);
@@ -36993,7 +37002,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
3699337002
dragOptions.doneFnCompleted(selection);
3699437003
}
3699537004

36996-
emitSelected(gd, eventData);
37005+
if(isSelectMode) {
37006+
emitSelected(gd, eventData);
37007+
}
3699737008
}).catch(Lib.error);
3699837009
};
3699937010
}
@@ -37215,15 +37226,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
3721537226
}
3721637227
}
3721737228

37229+
function hasActiveShape(gd) {
37230+
return gd._fullLayout._activeShapeIndex >= 0;
37231+
}
37232+
37233+
function hasActiveSelection(gd) {
37234+
return gd._fullLayout._activeSelectionIndex >= 0;
37235+
}
37236+
3721837237
function clearSelectionsCache(dragOptions, immediateSelect) {
3721937238
var dragmode = dragOptions.dragmode;
3722037239
var plotinfo = dragOptions.plotinfo;
3722137240

3722237241
var gd = dragOptions.gd;
37223-
if(gd._fullLayout._activeShapeIndex >= 0) {
37242+
if(hasActiveShape(gd)) {
3722437243
gd._fullLayout._deactivateShape(gd);
3722537244
}
37226-
if(gd._fullLayout._activeSelectionIndex >= 0) {
37245+
if(hasActiveSelection(gd)) {
3722737246
gd._fullLayout._deactivateSelection(gd);
3722837247
}
3722937248

@@ -37251,7 +37270,7 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
3725137270
var selections;
3725237271
if(
3725337272
isSelectMode &&
37254-
!dragOptions.subplot // only allow cartesian - no mapbox for now
37273+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
3725537274
) {
3725637275
selections = newSelections(outlines, dragOptions);
3725737276
}
@@ -37290,7 +37309,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
3729037309

3729137310
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
3729237311

37293-
if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {
37312+
if(
37313+
hasSubplot({subplot: subplot}) &&
37314+
(trace.subplot === subplot || trace.geo === subplot)
37315+
) {
3729437316
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
3729537317
} else if(trace.type === 'splom') {
3729637318
// FIXME: make sure we don't have more than single axis for splom
@@ -38045,13 +38067,10 @@ function getFillRangeItems(dragOptions) {
3804538067
}
3804638068

3804738069
function emitSelecting(gd, eventData) {
38048-
if(drawMode(gd._fullLayout.dragmode)) return;
3804938070
gd.emit('plotly_selecting', eventData);
3805038071
}
3805138072

3805238073
function emitSelected(gd, eventData) {
38053-
if(drawMode(gd._fullLayout.dragmode)) return;
38054-
3805538074
if(eventData) {
3805638075
eventData.selections = (gd.layout || {}).selections || [];
3805738076
}
@@ -38060,7 +38079,6 @@ function emitSelected(gd, eventData) {
3806038079
}
3806138080

3806238081
function emitDeselect(gd) {
38063-
if(drawMode(gd._fullLayout.dragmode)) return;
3806438082
gd.emit('plotly_deselect', null);
3806538083
}
3806638084

@@ -84670,7 +84688,7 @@ function getSortFunc(opts, d2c) {
8467084688
'use strict';
8467184689

8467284690
// package version injected by `npm run preprocess`
84673-
exports.version = '2.13.1';
84691+
exports.version = '2.13.2';
8467484692

8467584693
},{}]},{},[8])(8)
8467684694
});

Diff for: dist/plotly-basic.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/plotly-cartesian.js

+33-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* plotly.js (cartesian) v2.13.1
2+
* plotly.js (cartesian) v2.13.2
33
* Copyright 2012-2022, Plotly, Inc.
44
* All rights reserved.
55
* Licensed under the MIT license
@@ -45762,7 +45762,14 @@ var p2r = helpers.p2r;
4576245762
var axValue = helpers.axValue;
4576345763
var getTransform = helpers.getTransform;
4576445764

45765+
function hasSubplot(dragOptions) {
45766+
// N.B. subplot may be falsy e.g zero sankey index!
45767+
return dragOptions.subplot !== undefined;
45768+
}
45769+
4576545770
function prepSelect(evt, startX, startY, dragOptions, mode) {
45771+
var isCartesian = !hasSubplot(dragOptions);
45772+
4576645773
var isFreeMode = freeMode(mode);
4576745774
var isRectMode = rectMode(mode);
4576845775
var isOpenMode = openMode(mode);
@@ -45776,7 +45783,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
4577645783
var gd = dragOptions.gd;
4577745784
var fullLayout = gd._fullLayout;
4577845785
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
45779-
!dragOptions.subplot; // N.B. only cartesian subplots have persistent selection
45786+
isCartesian; // N.B. only cartesian subplots have persistent selection
4578045787

4578145788
var zoomLayer = fullLayout._zoomlayer;
4578245789
var dragBBox = dragOptions.element.getBoundingClientRect();
@@ -45824,9 +45831,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
4582445831
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
4582545832
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
4582645833
stroke: newStyle.line.color || (
45827-
dragOptions.subplot !== undefined ?
45828-
'#7f7f7f' : // non-cartesian subplot
45829-
Color.contrast(gd._fullLayout.plot_bgcolor) // cartesian subplot
45834+
isCartesian ?
45835+
Color.contrast(gd._fullLayout.plot_bgcolor) :
45836+
'#7f7f7f' // non-cartesian subplot
4583045837
),
4583145838
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
4583245839
'stroke-width': newStyle.line.width + 'px',
@@ -45857,6 +45864,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
4585745864

4585845865
if(immediateSelect && !evt.shiftKey) {
4585945866
dragOptions._clearSubplotSelections = function() {
45867+
if(!isCartesian) return;
45868+
4586045869
var xRef = xAxis._id;
4586145870
var yRef = yAxis._id;
4586245871
deselectSubplot(gd, xRef, yRef, searchTraces);
@@ -46163,7 +46172,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
4616346172
dragOptions.doneFnCompleted(selection);
4616446173
}
4616546174

46166-
emitSelected(gd, eventData);
46175+
if(isSelectMode) {
46176+
emitSelected(gd, eventData);
46177+
}
4616746178
}).catch(Lib.error);
4616846179
};
4616946180
}
@@ -46385,15 +46396,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
4638546396
}
4638646397
}
4638746398

46399+
function hasActiveShape(gd) {
46400+
return gd._fullLayout._activeShapeIndex >= 0;
46401+
}
46402+
46403+
function hasActiveSelection(gd) {
46404+
return gd._fullLayout._activeSelectionIndex >= 0;
46405+
}
46406+
4638846407
function clearSelectionsCache(dragOptions, immediateSelect) {
4638946408
var dragmode = dragOptions.dragmode;
4639046409
var plotinfo = dragOptions.plotinfo;
4639146410

4639246411
var gd = dragOptions.gd;
46393-
if(gd._fullLayout._activeShapeIndex >= 0) {
46412+
if(hasActiveShape(gd)) {
4639446413
gd._fullLayout._deactivateShape(gd);
4639546414
}
46396-
if(gd._fullLayout._activeSelectionIndex >= 0) {
46415+
if(hasActiveSelection(gd)) {
4639746416
gd._fullLayout._deactivateSelection(gd);
4639846417
}
4639946418

@@ -46421,7 +46440,7 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
4642146440
var selections;
4642246441
if(
4642346442
isSelectMode &&
46424-
!dragOptions.subplot // only allow cartesian - no mapbox for now
46443+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
4642546444
) {
4642646445
selections = newSelections(outlines, dragOptions);
4642746446
}
@@ -46460,7 +46479,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
4646046479

4646146480
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
4646246481

46463-
if(subplot && (trace.subplot === subplot || trace.geo === subplot)) {
46482+
if(
46483+
hasSubplot({subplot: subplot}) &&
46484+
(trace.subplot === subplot || trace.geo === subplot)
46485+
) {
4646446486
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
4646546487
} else if(trace.type === 'splom') {
4646646488
// FIXME: make sure we don't have more than single axis for splom
@@ -47215,13 +47237,10 @@ function getFillRangeItems(dragOptions) {
4721547237
}
4721647238

4721747239
function emitSelecting(gd, eventData) {
47218-
if(drawMode(gd._fullLayout.dragmode)) return;
4721947240
gd.emit('plotly_selecting', eventData);
4722047241
}
4722147242

4722247243
function emitSelected(gd, eventData) {
47223-
if(drawMode(gd._fullLayout.dragmode)) return;
47224-
4722547244
if(eventData) {
4722647245
eventData.selections = (gd.layout || {}).selections || [];
4722747246
}
@@ -47230,7 +47249,6 @@ function emitSelected(gd, eventData) {
4723047249
}
4723147250

4723247251
function emitDeselect(gd) {
47233-
if(drawMode(gd._fullLayout.dragmode)) return;
4723447252
gd.emit('plotly_deselect', null);
4723547253
}
4723647254

@@ -104895,7 +104913,7 @@ function getSortFunc(opts, d2c) {
104895104913
'use strict';
104896104914

104897104915
// package version injected by `npm run preprocess`
104898-
exports.version = '2.13.1';
104916+
exports.version = '2.13.2';
104899104917

104900104918
},{}]},{},[15])(15)
104901104919
});

0 commit comments

Comments
 (0)