plotly.js 2.13.1 → 2.13.2
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 +8 -0
- package/README.md +3 -3
- package/dist/README.md +20 -20
- package/dist/plotly-basic.js +33 -15
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +33 -15
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +33 -15
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +33 -15
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +33 -15
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +33 -15
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-mapbox.js +33 -15
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +34 -15
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +34 -15
- package/dist/plotly.js +34 -15
- package/dist/plotly.min.js +2 -2
- package/package.json +1 -1
- package/src/components/selections/select.js +31 -13
- package/src/traces/sankey/base_plot.js +1 -0
- package/src/version.js +1 -1
package/dist/plotly-gl3d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js (gl3d) v2.13.
|
|
2
|
+
* plotly.js (gl3d) v2.13.2
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -37282,7 +37282,14 @@ var p2r = helpers.p2r;
|
|
|
37282
37282
|
var axValue = helpers.axValue;
|
|
37283
37283
|
var getTransform = helpers.getTransform;
|
|
37284
37284
|
|
|
37285
|
+
function hasSubplot(dragOptions) {
|
|
37286
|
+
// N.B. subplot may be falsy e.g zero sankey index!
|
|
37287
|
+
return dragOptions.subplot !== undefined;
|
|
37288
|
+
}
|
|
37289
|
+
|
|
37285
37290
|
function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
37291
|
+
var isCartesian = !hasSubplot(dragOptions);
|
|
37292
|
+
|
|
37286
37293
|
var isFreeMode = freeMode(mode);
|
|
37287
37294
|
var isRectMode = rectMode(mode);
|
|
37288
37295
|
var isOpenMode = openMode(mode);
|
|
@@ -37296,7 +37303,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
37296
37303
|
var gd = dragOptions.gd;
|
|
37297
37304
|
var fullLayout = gd._fullLayout;
|
|
37298
37305
|
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
|
|
37299
|
-
|
|
37306
|
+
isCartesian; // N.B. only cartesian subplots have persistent selection
|
|
37300
37307
|
|
|
37301
37308
|
var zoomLayer = fullLayout._zoomlayer;
|
|
37302
37309
|
var dragBBox = dragOptions.element.getBoundingClientRect();
|
|
@@ -37344,9 +37351,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
37344
37351
|
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
|
|
37345
37352
|
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
|
|
37346
37353
|
stroke: newStyle.line.color || (
|
|
37347
|
-
|
|
37348
|
-
|
|
37349
|
-
|
|
37354
|
+
isCartesian ?
|
|
37355
|
+
Color.contrast(gd._fullLayout.plot_bgcolor) :
|
|
37356
|
+
'#7f7f7f' // non-cartesian subplot
|
|
37350
37357
|
),
|
|
37351
37358
|
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
|
|
37352
37359
|
'stroke-width': newStyle.line.width + 'px',
|
|
@@ -37377,6 +37384,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
37377
37384
|
|
|
37378
37385
|
if(immediateSelect && !evt.shiftKey) {
|
|
37379
37386
|
dragOptions._clearSubplotSelections = function() {
|
|
37387
|
+
if(!isCartesian) return;
|
|
37388
|
+
|
|
37380
37389
|
var xRef = xAxis._id;
|
|
37381
37390
|
var yRef = yAxis._id;
|
|
37382
37391
|
deselectSubplot(gd, xRef, yRef, searchTraces);
|
|
@@ -37683,7 +37692,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
37683
37692
|
dragOptions.doneFnCompleted(selection);
|
|
37684
37693
|
}
|
|
37685
37694
|
|
|
37686
|
-
|
|
37695
|
+
if(isSelectMode) {
|
|
37696
|
+
emitSelected(gd, eventData);
|
|
37697
|
+
}
|
|
37687
37698
|
}).catch(Lib.error);
|
|
37688
37699
|
};
|
|
37689
37700
|
}
|
|
@@ -37905,15 +37916,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
|
|
|
37905
37916
|
}
|
|
37906
37917
|
}
|
|
37907
37918
|
|
|
37919
|
+
function hasActiveShape(gd) {
|
|
37920
|
+
return gd._fullLayout._activeShapeIndex >= 0;
|
|
37921
|
+
}
|
|
37922
|
+
|
|
37923
|
+
function hasActiveSelection(gd) {
|
|
37924
|
+
return gd._fullLayout._activeSelectionIndex >= 0;
|
|
37925
|
+
}
|
|
37926
|
+
|
|
37908
37927
|
function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
37909
37928
|
var dragmode = dragOptions.dragmode;
|
|
37910
37929
|
var plotinfo = dragOptions.plotinfo;
|
|
37911
37930
|
|
|
37912
37931
|
var gd = dragOptions.gd;
|
|
37913
|
-
if(gd
|
|
37932
|
+
if(hasActiveShape(gd)) {
|
|
37914
37933
|
gd._fullLayout._deactivateShape(gd);
|
|
37915
37934
|
}
|
|
37916
|
-
if(gd
|
|
37935
|
+
if(hasActiveSelection(gd)) {
|
|
37917
37936
|
gd._fullLayout._deactivateSelection(gd);
|
|
37918
37937
|
}
|
|
37919
37938
|
|
|
@@ -37941,7 +37960,7 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
|
37941
37960
|
var selections;
|
|
37942
37961
|
if(
|
|
37943
37962
|
isSelectMode &&
|
|
37944
|
-
!dragOptions
|
|
37963
|
+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
|
|
37945
37964
|
) {
|
|
37946
37965
|
selections = newSelections(outlines, dragOptions);
|
|
37947
37966
|
}
|
|
@@ -37980,7 +37999,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
|
|
|
37980
37999
|
|
|
37981
38000
|
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
|
|
37982
38001
|
|
|
37983
|
-
if(
|
|
38002
|
+
if(
|
|
38003
|
+
hasSubplot({subplot: subplot}) &&
|
|
38004
|
+
(trace.subplot === subplot || trace.geo === subplot)
|
|
38005
|
+
) {
|
|
37984
38006
|
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
|
|
37985
38007
|
} else if(trace.type === 'splom') {
|
|
37986
38008
|
// FIXME: make sure we don't have more than single axis for splom
|
|
@@ -38735,13 +38757,10 @@ function getFillRangeItems(dragOptions) {
|
|
|
38735
38757
|
}
|
|
38736
38758
|
|
|
38737
38759
|
function emitSelecting(gd, eventData) {
|
|
38738
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
38739
38760
|
gd.emit('plotly_selecting', eventData);
|
|
38740
38761
|
}
|
|
38741
38762
|
|
|
38742
38763
|
function emitSelected(gd, eventData) {
|
|
38743
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
38744
|
-
|
|
38745
38764
|
if(eventData) {
|
|
38746
38765
|
eventData.selections = (gd.layout || {}).selections || [];
|
|
38747
38766
|
}
|
|
@@ -38750,7 +38769,6 @@ function emitSelected(gd, eventData) {
|
|
|
38750
38769
|
}
|
|
38751
38770
|
|
|
38752
38771
|
function emitDeselect(gd) {
|
|
38753
|
-
if(drawMode(gd._fullLayout.dragmode)) return;
|
|
38754
38772
|
gd.emit('plotly_deselect', null);
|
|
38755
38773
|
}
|
|
38756
38774
|
|
|
@@ -88325,7 +88343,7 @@ function getSortFunc(opts, d2c) {
|
|
|
88325
88343
|
'use strict';
|
|
88326
88344
|
|
|
88327
88345
|
// package version injected by `npm run preprocess`
|
|
88328
|
-
exports.version = '2.13.
|
|
88346
|
+
exports.version = '2.13.2';
|
|
88329
88347
|
|
|
88330
88348
|
},{}],444:[function(_dereq_,module,exports){
|
|
88331
88349
|
(function (global){(function (){
|