plotly.js 2.13.0 → 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 +20 -0
- package/README.md +3 -3
- package/dist/README.md +26 -26
- package/dist/plotly-basic.js +71 -28
- package/dist/plotly-basic.min.js +2 -2
- package/dist/plotly-cartesian.js +71 -28
- package/dist/plotly-cartesian.min.js +2 -2
- package/dist/plotly-finance.js +71 -28
- package/dist/plotly-finance.min.js +2 -2
- package/dist/plotly-geo-assets.js +2 -2
- package/dist/plotly-geo.js +71 -28
- package/dist/plotly-geo.min.js +2 -2
- package/dist/plotly-gl2d.js +71 -28
- package/dist/plotly-gl2d.min.js +2 -2
- package/dist/plotly-gl3d.js +71 -28
- package/dist/plotly-gl3d.min.js +2 -2
- package/dist/plotly-mapbox.js +71 -28
- package/dist/plotly-mapbox.min.js +2 -2
- package/dist/plotly-strict.js +72 -28
- package/dist/plotly-strict.min.js +2 -2
- package/dist/plotly-with-meta.js +72 -28
- package/dist/plotly.js +72 -28
- package/dist/plotly.min.js +2 -2
- package/package.json +1 -1
- package/src/components/selections/select.js +59 -25
- package/src/plots/plots.js +10 -1
- package/src/traces/sankey/base_plot.js +1 -0
- package/src/version.js +1 -1
package/dist/plotly-with-meta.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v2.13.
|
|
2
|
+
* plotly.js v2.13.3
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -122005,7 +122005,14 @@ var p2r = helpers.p2r;
|
|
|
122005
122005
|
var axValue = helpers.axValue;
|
|
122006
122006
|
var getTransform = helpers.getTransform;
|
|
122007
122007
|
|
|
122008
|
+
function hasSubplot(dragOptions) {
|
|
122009
|
+
// N.B. subplot may be falsy e.g zero sankey index!
|
|
122010
|
+
return dragOptions.subplot !== undefined;
|
|
122011
|
+
}
|
|
122012
|
+
|
|
122008
122013
|
function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
122014
|
+
var isCartesian = !hasSubplot(dragOptions);
|
|
122015
|
+
|
|
122009
122016
|
var isFreeMode = freeMode(mode);
|
|
122010
122017
|
var isRectMode = rectMode(mode);
|
|
122011
122018
|
var isOpenMode = openMode(mode);
|
|
@@ -122019,7 +122026,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122019
122026
|
var gd = dragOptions.gd;
|
|
122020
122027
|
var fullLayout = gd._fullLayout;
|
|
122021
122028
|
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
|
|
122022
|
-
|
|
122029
|
+
isCartesian; // N.B. only cartesian subplots have persistent selection
|
|
122023
122030
|
|
|
122024
122031
|
var zoomLayer = fullLayout._zoomlayer;
|
|
122025
122032
|
var dragBBox = dragOptions.element.getBoundingClientRect();
|
|
@@ -122067,9 +122074,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122067
122074
|
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
|
|
122068
122075
|
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
|
|
122069
122076
|
stroke: newStyle.line.color || (
|
|
122070
|
-
|
|
122071
|
-
|
|
122072
|
-
|
|
122077
|
+
isCartesian ?
|
|
122078
|
+
Color.contrast(gd._fullLayout.plot_bgcolor) :
|
|
122079
|
+
'#7f7f7f' // non-cartesian subplot
|
|
122073
122080
|
),
|
|
122074
122081
|
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
|
|
122075
122082
|
'stroke-width': newStyle.line.width + 'px',
|
|
@@ -122100,6 +122107,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122100
122107
|
|
|
122101
122108
|
if(immediateSelect && !evt.shiftKey) {
|
|
122102
122109
|
dragOptions._clearSubplotSelections = function() {
|
|
122110
|
+
if(!isCartesian) return;
|
|
122111
|
+
|
|
122103
122112
|
var xRef = xAxis._id;
|
|
122104
122113
|
var yRef = yAxis._id;
|
|
122105
122114
|
deselectSubplot(gd, xRef, yRef, searchTraces);
|
|
@@ -122120,6 +122129,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122120
122129
|
}
|
|
122121
122130
|
|
|
122122
122131
|
if(selectionErased) {
|
|
122132
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
122133
|
+
|
|
122123
122134
|
Registry.call('_guiRelayout', gd, {
|
|
122124
122135
|
selections: list
|
|
122125
122136
|
});
|
|
@@ -122261,10 +122272,10 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122261
122272
|
displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
|
|
122262
122273
|
|
|
122263
122274
|
if(isSelectMode) {
|
|
122264
|
-
var _res = reselect(gd);
|
|
122275
|
+
var _res = reselect(gd, false);
|
|
122265
122276
|
var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
|
|
122266
122277
|
|
|
122267
|
-
_res = reselect(gd, selectionTesters, searchTraces, dragOptions);
|
|
122278
|
+
_res = reselect(gd, false, selectionTesters, searchTraces, dragOptions);
|
|
122268
122279
|
selectionTesters = _res.selectionTesters;
|
|
122269
122280
|
eventData = _res.eventData;
|
|
122270
122281
|
|
|
@@ -122358,9 +122369,13 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122358
122369
|
}
|
|
122359
122370
|
}
|
|
122360
122371
|
|
|
122361
|
-
|
|
122362
|
-
|
|
122363
|
-
|
|
122372
|
+
if(subSelections.length < allSelections.length) {
|
|
122373
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
122374
|
+
|
|
122375
|
+
Registry.call('_guiRelayout', gd, {
|
|
122376
|
+
selections: subSelections
|
|
122377
|
+
});
|
|
122378
|
+
}
|
|
122364
122379
|
}
|
|
122365
122380
|
}
|
|
122366
122381
|
} else {
|
|
@@ -122406,8 +122421,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
122406
122421
|
dragOptions.doneFnCompleted(selection);
|
|
122407
122422
|
}
|
|
122408
122423
|
|
|
122409
|
-
|
|
122410
|
-
|
|
122424
|
+
if(isSelectMode) {
|
|
122425
|
+
emitSelected(gd, eventData);
|
|
122426
|
+
}
|
|
122411
122427
|
}).catch(Lib.error);
|
|
122412
122428
|
};
|
|
122413
122429
|
}
|
|
@@ -122485,7 +122501,6 @@ function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutli
|
|
|
122485
122501
|
}
|
|
122486
122502
|
|
|
122487
122503
|
if(sendEvents) {
|
|
122488
|
-
eventData.selections = gd.layout.selections;
|
|
122489
122504
|
emitSelected(gd, eventData);
|
|
122490
122505
|
}
|
|
122491
122506
|
}
|
|
@@ -122630,15 +122645,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
|
|
|
122630
122645
|
}
|
|
122631
122646
|
}
|
|
122632
122647
|
|
|
122648
|
+
function hasActiveShape(gd) {
|
|
122649
|
+
return gd._fullLayout._activeShapeIndex >= 0;
|
|
122650
|
+
}
|
|
122651
|
+
|
|
122652
|
+
function hasActiveSelection(gd) {
|
|
122653
|
+
return gd._fullLayout._activeSelectionIndex >= 0;
|
|
122654
|
+
}
|
|
122655
|
+
|
|
122633
122656
|
function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
122634
122657
|
var dragmode = dragOptions.dragmode;
|
|
122635
122658
|
var plotinfo = dragOptions.plotinfo;
|
|
122636
122659
|
|
|
122637
122660
|
var gd = dragOptions.gd;
|
|
122638
|
-
if(gd
|
|
122661
|
+
if(hasActiveShape(gd)) {
|
|
122639
122662
|
gd._fullLayout._deactivateShape(gd);
|
|
122640
122663
|
}
|
|
122641
|
-
if(gd
|
|
122664
|
+
if(hasActiveSelection(gd)) {
|
|
122642
122665
|
gd._fullLayout._deactivateSelection(gd);
|
|
122643
122666
|
}
|
|
122644
122667
|
|
|
@@ -122666,11 +122689,13 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
|
122666
122689
|
var selections;
|
|
122667
122690
|
if(
|
|
122668
122691
|
isSelectMode &&
|
|
122669
|
-
!dragOptions
|
|
122692
|
+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
|
|
122670
122693
|
) {
|
|
122671
122694
|
selections = newSelections(outlines, dragOptions);
|
|
122672
122695
|
}
|
|
122673
122696
|
if(selections) {
|
|
122697
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
122698
|
+
|
|
122674
122699
|
Registry.call('_guiRelayout', gd, {
|
|
122675
122700
|
selections: selections
|
|
122676
122701
|
}).then(function() {
|
|
@@ -122705,7 +122730,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
|
|
|
122705
122730
|
|
|
122706
122731
|
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
|
|
122707
122732
|
|
|
122708
|
-
if(
|
|
122733
|
+
if(
|
|
122734
|
+
hasSubplot({subplot: subplot}) &&
|
|
122735
|
+
(trace.subplot === subplot || trace.geo === subplot)
|
|
122736
|
+
) {
|
|
122709
122737
|
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
|
|
122710
122738
|
} else if(trace.type === 'splom') {
|
|
122711
122739
|
// FIXME: make sure we don't have more than single axis for splom
|
|
@@ -123005,7 +123033,7 @@ function _doSelect(selectionTesters, searchTraces) {
|
|
|
123005
123033
|
return allSelections;
|
|
123006
123034
|
}
|
|
123007
123035
|
|
|
123008
|
-
function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
123036
|
+
function reselect(gd, mayEmitSelected, selectionTesters, searchTraces, dragOptions) {
|
|
123009
123037
|
var hadSearchTraces = !!searchTraces;
|
|
123010
123038
|
var plotinfo, xRef, yRef;
|
|
123011
123039
|
if(dragOptions) {
|
|
@@ -123128,15 +123156,15 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
123128
123156
|
updateSelectedState(gd, allSearchTraces, eventData);
|
|
123129
123157
|
|
|
123130
123158
|
var clickmode = fullLayout.clickmode;
|
|
123131
|
-
var sendEvents = clickmode.indexOf('event') > -1;
|
|
123159
|
+
var sendEvents = clickmode.indexOf('event') > -1 && mayEmitSelected;
|
|
123132
123160
|
|
|
123133
123161
|
if(
|
|
123134
123162
|
!plotinfo && // get called from plot_api & plots
|
|
123135
|
-
|
|
123163
|
+
mayEmitSelected
|
|
123136
123164
|
) {
|
|
123137
|
-
|
|
123138
|
-
var activePolygons = getLayoutPolygons(gd, true);
|
|
123165
|
+
var activePolygons = getLayoutPolygons(gd, true);
|
|
123139
123166
|
|
|
123167
|
+
if(activePolygons.length) {
|
|
123140
123168
|
var xref = activePolygons[0].xref;
|
|
123141
123169
|
var yref = activePolygons[0].yref;
|
|
123142
123170
|
if(xref && yref) {
|
|
@@ -123149,9 +123177,12 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
123149
123177
|
|
|
123150
123178
|
fillRangeItems(eventData, poly);
|
|
123151
123179
|
}
|
|
123180
|
+
}
|
|
123152
123181
|
|
|
123153
|
-
|
|
123154
|
-
|
|
123182
|
+
if(gd._fullLayout._noEmitSelectedAtStart) {
|
|
123183
|
+
gd._fullLayout._noEmitSelectedAtStart = false;
|
|
123184
|
+
} else {
|
|
123185
|
+
if(sendEvents) emitSelected(gd, eventData);
|
|
123155
123186
|
}
|
|
123156
123187
|
|
|
123157
123188
|
fullLayout._reselect = false;
|
|
@@ -123171,10 +123202,9 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
123171
123202
|
|
|
123172
123203
|
if(sendEvents) {
|
|
123173
123204
|
if(eventData.points.length) {
|
|
123174
|
-
eventData.selections = gd.layout.selections;
|
|
123175
123205
|
emitSelected(gd, eventData);
|
|
123176
123206
|
} else {
|
|
123177
|
-
gd
|
|
123207
|
+
emitDeselect(gd);
|
|
123178
123208
|
}
|
|
123179
123209
|
}
|
|
123180
123210
|
|
|
@@ -123466,6 +123496,10 @@ function emitSelecting(gd, eventData) {
|
|
|
123466
123496
|
}
|
|
123467
123497
|
|
|
123468
123498
|
function emitSelected(gd, eventData) {
|
|
123499
|
+
if(eventData) {
|
|
123500
|
+
eventData.selections = (gd.layout || {}).selections || [];
|
|
123501
|
+
}
|
|
123502
|
+
|
|
123469
123503
|
gd.emit('plotly_selected', eventData);
|
|
123470
123504
|
}
|
|
123471
123505
|
|
|
@@ -170114,7 +170148,16 @@ plots.redrag = function(gd) {
|
|
|
170114
170148
|
};
|
|
170115
170149
|
|
|
170116
170150
|
plots.reselect = function(gd) {
|
|
170117
|
-
|
|
170151
|
+
var fullLayout = gd._fullLayout;
|
|
170152
|
+
|
|
170153
|
+
var A = (gd.layout || {}).selections;
|
|
170154
|
+
var B = fullLayout._previousSelections;
|
|
170155
|
+
fullLayout._previousSelections = A;
|
|
170156
|
+
|
|
170157
|
+
var mayEmitSelected = fullLayout._reselect ||
|
|
170158
|
+
JSON.stringify(A) !== JSON.stringify(B);
|
|
170159
|
+
|
|
170160
|
+
Registry.getComponentMethod('selections', 'reselect')(gd, mayEmitSelected);
|
|
170118
170161
|
};
|
|
170119
170162
|
|
|
170120
170163
|
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
|
|
@@ -209676,6 +209719,7 @@ function subplotUpdateFx(gd, index) {
|
|
|
209676
209719
|
var dragMode = fullLayout.dragmode;
|
|
209677
209720
|
var cursor = fullLayout.dragmode === 'pan' ? 'move' : 'crosshair';
|
|
209678
209721
|
var bgRect = trace._bgRect;
|
|
209722
|
+
if(!bgRect) return;
|
|
209679
209723
|
|
|
209680
209724
|
if(dragMode === 'pan' || dragMode === 'zoom') return;
|
|
209681
209725
|
|
|
@@ -232755,7 +232799,7 @@ function getSortFunc(opts, d2c) {
|
|
|
232755
232799
|
'use strict';
|
|
232756
232800
|
|
|
232757
232801
|
// package version injected by `npm run preprocess`
|
|
232758
|
-
exports.version = '2.13.
|
|
232802
|
+
exports.version = '2.13.3';
|
|
232759
232803
|
|
|
232760
232804
|
},{}],1133:[function(_dereq_,module,exports){
|
|
232761
232805
|
(function (global){(function (){
|
package/dist/plotly.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* plotly.js v2.13.
|
|
2
|
+
* plotly.js v2.13.3
|
|
3
3
|
* Copyright 2012-2022, Plotly, Inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the MIT license
|
|
@@ -121056,7 +121056,14 @@ var p2r = helpers.p2r;
|
|
|
121056
121056
|
var axValue = helpers.axValue;
|
|
121057
121057
|
var getTransform = helpers.getTransform;
|
|
121058
121058
|
|
|
121059
|
+
function hasSubplot(dragOptions) {
|
|
121060
|
+
// N.B. subplot may be falsy e.g zero sankey index!
|
|
121061
|
+
return dragOptions.subplot !== undefined;
|
|
121062
|
+
}
|
|
121063
|
+
|
|
121059
121064
|
function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
121065
|
+
var isCartesian = !hasSubplot(dragOptions);
|
|
121066
|
+
|
|
121060
121067
|
var isFreeMode = freeMode(mode);
|
|
121061
121068
|
var isRectMode = rectMode(mode);
|
|
121062
121069
|
var isOpenMode = openMode(mode);
|
|
@@ -121070,7 +121077,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121070
121077
|
var gd = dragOptions.gd;
|
|
121071
121078
|
var fullLayout = gd._fullLayout;
|
|
121072
121079
|
var immediateSelect = isSelectMode && fullLayout.newselection.mode === 'immediate' &&
|
|
121073
|
-
|
|
121080
|
+
isCartesian; // N.B. only cartesian subplots have persistent selection
|
|
121074
121081
|
|
|
121075
121082
|
var zoomLayer = fullLayout._zoomlayer;
|
|
121076
121083
|
var dragBBox = dragOptions.element.getBoundingClientRect();
|
|
@@ -121118,9 +121125,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121118
121125
|
opacity: isDrawMode ? newStyle.opacity / 2 : 1,
|
|
121119
121126
|
fill: (isDrawMode && !isOpenMode) ? newStyle.fillcolor : 'none',
|
|
121120
121127
|
stroke: newStyle.line.color || (
|
|
121121
|
-
|
|
121122
|
-
|
|
121123
|
-
|
|
121128
|
+
isCartesian ?
|
|
121129
|
+
Color.contrast(gd._fullLayout.plot_bgcolor) :
|
|
121130
|
+
'#7f7f7f' // non-cartesian subplot
|
|
121124
121131
|
),
|
|
121125
121132
|
'stroke-dasharray': dashStyle(newStyle.line.dash, newStyle.line.width),
|
|
121126
121133
|
'stroke-width': newStyle.line.width + 'px',
|
|
@@ -121151,6 +121158,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121151
121158
|
|
|
121152
121159
|
if(immediateSelect && !evt.shiftKey) {
|
|
121153
121160
|
dragOptions._clearSubplotSelections = function() {
|
|
121161
|
+
if(!isCartesian) return;
|
|
121162
|
+
|
|
121154
121163
|
var xRef = xAxis._id;
|
|
121155
121164
|
var yRef = yAxis._id;
|
|
121156
121165
|
deselectSubplot(gd, xRef, yRef, searchTraces);
|
|
@@ -121171,6 +121180,8 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121171
121180
|
}
|
|
121172
121181
|
|
|
121173
121182
|
if(selectionErased) {
|
|
121183
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
121184
|
+
|
|
121174
121185
|
Registry.call('_guiRelayout', gd, {
|
|
121175
121186
|
selections: list
|
|
121176
121187
|
});
|
|
@@ -121312,10 +121323,10 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121312
121323
|
displayOutlines(convertPoly(mergedPolygons, isOpenMode), outlines, dragOptions);
|
|
121313
121324
|
|
|
121314
121325
|
if(isSelectMode) {
|
|
121315
|
-
var _res = reselect(gd);
|
|
121326
|
+
var _res = reselect(gd, false);
|
|
121316
121327
|
var extraPoints = _res.eventData ? _res.eventData.points.slice() : [];
|
|
121317
121328
|
|
|
121318
|
-
_res = reselect(gd, selectionTesters, searchTraces, dragOptions);
|
|
121329
|
+
_res = reselect(gd, false, selectionTesters, searchTraces, dragOptions);
|
|
121319
121330
|
selectionTesters = _res.selectionTesters;
|
|
121320
121331
|
eventData = _res.eventData;
|
|
121321
121332
|
|
|
@@ -121409,9 +121420,13 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121409
121420
|
}
|
|
121410
121421
|
}
|
|
121411
121422
|
|
|
121412
|
-
|
|
121413
|
-
|
|
121414
|
-
|
|
121423
|
+
if(subSelections.length < allSelections.length) {
|
|
121424
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
121425
|
+
|
|
121426
|
+
Registry.call('_guiRelayout', gd, {
|
|
121427
|
+
selections: subSelections
|
|
121428
|
+
});
|
|
121429
|
+
}
|
|
121415
121430
|
}
|
|
121416
121431
|
}
|
|
121417
121432
|
} else {
|
|
@@ -121457,8 +121472,9 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
|
|
|
121457
121472
|
dragOptions.doneFnCompleted(selection);
|
|
121458
121473
|
}
|
|
121459
121474
|
|
|
121460
|
-
|
|
121461
|
-
|
|
121475
|
+
if(isSelectMode) {
|
|
121476
|
+
emitSelected(gd, eventData);
|
|
121477
|
+
}
|
|
121462
121478
|
}).catch(Lib.error);
|
|
121463
121479
|
};
|
|
121464
121480
|
}
|
|
@@ -121536,7 +121552,6 @@ function selectOnClick(evt, gd, xAxes, yAxes, subplot, dragOptions, polygonOutli
|
|
|
121536
121552
|
}
|
|
121537
121553
|
|
|
121538
121554
|
if(sendEvents) {
|
|
121539
|
-
eventData.selections = gd.layout.selections;
|
|
121540
121555
|
emitSelected(gd, eventData);
|
|
121541
121556
|
}
|
|
121542
121557
|
}
|
|
@@ -121681,15 +121696,23 @@ function coerceSelectionsCache(evt, gd, dragOptions) {
|
|
|
121681
121696
|
}
|
|
121682
121697
|
}
|
|
121683
121698
|
|
|
121699
|
+
function hasActiveShape(gd) {
|
|
121700
|
+
return gd._fullLayout._activeShapeIndex >= 0;
|
|
121701
|
+
}
|
|
121702
|
+
|
|
121703
|
+
function hasActiveSelection(gd) {
|
|
121704
|
+
return gd._fullLayout._activeSelectionIndex >= 0;
|
|
121705
|
+
}
|
|
121706
|
+
|
|
121684
121707
|
function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
121685
121708
|
var dragmode = dragOptions.dragmode;
|
|
121686
121709
|
var plotinfo = dragOptions.plotinfo;
|
|
121687
121710
|
|
|
121688
121711
|
var gd = dragOptions.gd;
|
|
121689
|
-
if(gd
|
|
121712
|
+
if(hasActiveShape(gd)) {
|
|
121690
121713
|
gd._fullLayout._deactivateShape(gd);
|
|
121691
121714
|
}
|
|
121692
|
-
if(gd
|
|
121715
|
+
if(hasActiveSelection(gd)) {
|
|
121693
121716
|
gd._fullLayout._deactivateSelection(gd);
|
|
121694
121717
|
}
|
|
121695
121718
|
|
|
@@ -121717,11 +121740,13 @@ function clearSelectionsCache(dragOptions, immediateSelect) {
|
|
|
121717
121740
|
var selections;
|
|
121718
121741
|
if(
|
|
121719
121742
|
isSelectMode &&
|
|
121720
|
-
!dragOptions
|
|
121743
|
+
!hasSubplot(dragOptions) // only allow cartesian - no mapbox for now
|
|
121721
121744
|
) {
|
|
121722
121745
|
selections = newSelections(outlines, dragOptions);
|
|
121723
121746
|
}
|
|
121724
121747
|
if(selections) {
|
|
121748
|
+
gd._fullLayout._noEmitSelectedAtStart = true;
|
|
121749
|
+
|
|
121725
121750
|
Registry.call('_guiRelayout', gd, {
|
|
121726
121751
|
selections: selections
|
|
121727
121752
|
}).then(function() {
|
|
@@ -121756,7 +121781,10 @@ function determineSearchTraces(gd, xAxes, yAxes, subplot) {
|
|
|
121756
121781
|
|
|
121757
121782
|
if(trace.visible !== true || !trace._module || !trace._module.selectPoints) continue;
|
|
121758
121783
|
|
|
121759
|
-
if(
|
|
121784
|
+
if(
|
|
121785
|
+
hasSubplot({subplot: subplot}) &&
|
|
121786
|
+
(trace.subplot === subplot || trace.geo === subplot)
|
|
121787
|
+
) {
|
|
121760
121788
|
searchTraces.push(createSearchInfo(trace._module, cd, xAxes[0], yAxes[0]));
|
|
121761
121789
|
} else if(trace.type === 'splom') {
|
|
121762
121790
|
// FIXME: make sure we don't have more than single axis for splom
|
|
@@ -122056,7 +122084,7 @@ function _doSelect(selectionTesters, searchTraces) {
|
|
|
122056
122084
|
return allSelections;
|
|
122057
122085
|
}
|
|
122058
122086
|
|
|
122059
|
-
function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
122087
|
+
function reselect(gd, mayEmitSelected, selectionTesters, searchTraces, dragOptions) {
|
|
122060
122088
|
var hadSearchTraces = !!searchTraces;
|
|
122061
122089
|
var plotinfo, xRef, yRef;
|
|
122062
122090
|
if(dragOptions) {
|
|
@@ -122179,15 +122207,15 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
122179
122207
|
updateSelectedState(gd, allSearchTraces, eventData);
|
|
122180
122208
|
|
|
122181
122209
|
var clickmode = fullLayout.clickmode;
|
|
122182
|
-
var sendEvents = clickmode.indexOf('event') > -1;
|
|
122210
|
+
var sendEvents = clickmode.indexOf('event') > -1 && mayEmitSelected;
|
|
122183
122211
|
|
|
122184
122212
|
if(
|
|
122185
122213
|
!plotinfo && // get called from plot_api & plots
|
|
122186
|
-
|
|
122214
|
+
mayEmitSelected
|
|
122187
122215
|
) {
|
|
122188
|
-
|
|
122189
|
-
var activePolygons = getLayoutPolygons(gd, true);
|
|
122216
|
+
var activePolygons = getLayoutPolygons(gd, true);
|
|
122190
122217
|
|
|
122218
|
+
if(activePolygons.length) {
|
|
122191
122219
|
var xref = activePolygons[0].xref;
|
|
122192
122220
|
var yref = activePolygons[0].yref;
|
|
122193
122221
|
if(xref && yref) {
|
|
@@ -122200,9 +122228,12 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
122200
122228
|
|
|
122201
122229
|
fillRangeItems(eventData, poly);
|
|
122202
122230
|
}
|
|
122231
|
+
}
|
|
122203
122232
|
|
|
122204
|
-
|
|
122205
|
-
|
|
122233
|
+
if(gd._fullLayout._noEmitSelectedAtStart) {
|
|
122234
|
+
gd._fullLayout._noEmitSelectedAtStart = false;
|
|
122235
|
+
} else {
|
|
122236
|
+
if(sendEvents) emitSelected(gd, eventData);
|
|
122206
122237
|
}
|
|
122207
122238
|
|
|
122208
122239
|
fullLayout._reselect = false;
|
|
@@ -122222,10 +122253,9 @@ function reselect(gd, selectionTesters, searchTraces, dragOptions) {
|
|
|
122222
122253
|
|
|
122223
122254
|
if(sendEvents) {
|
|
122224
122255
|
if(eventData.points.length) {
|
|
122225
|
-
eventData.selections = gd.layout.selections;
|
|
122226
122256
|
emitSelected(gd, eventData);
|
|
122227
122257
|
} else {
|
|
122228
|
-
gd
|
|
122258
|
+
emitDeselect(gd);
|
|
122229
122259
|
}
|
|
122230
122260
|
}
|
|
122231
122261
|
|
|
@@ -122517,6 +122547,10 @@ function emitSelecting(gd, eventData) {
|
|
|
122517
122547
|
}
|
|
122518
122548
|
|
|
122519
122549
|
function emitSelected(gd, eventData) {
|
|
122550
|
+
if(eventData) {
|
|
122551
|
+
eventData.selections = (gd.layout || {}).selections || [];
|
|
122552
|
+
}
|
|
122553
|
+
|
|
122520
122554
|
gd.emit('plotly_selected', eventData);
|
|
122521
122555
|
}
|
|
122522
122556
|
|
|
@@ -167222,7 +167256,16 @@ plots.redrag = function(gd) {
|
|
|
167222
167256
|
};
|
|
167223
167257
|
|
|
167224
167258
|
plots.reselect = function(gd) {
|
|
167225
|
-
|
|
167259
|
+
var fullLayout = gd._fullLayout;
|
|
167260
|
+
|
|
167261
|
+
var A = (gd.layout || {}).selections;
|
|
167262
|
+
var B = fullLayout._previousSelections;
|
|
167263
|
+
fullLayout._previousSelections = A;
|
|
167264
|
+
|
|
167265
|
+
var mayEmitSelected = fullLayout._reselect ||
|
|
167266
|
+
JSON.stringify(A) !== JSON.stringify(B);
|
|
167267
|
+
|
|
167268
|
+
Registry.getComponentMethod('selections', 'reselect')(gd, mayEmitSelected);
|
|
167226
167269
|
};
|
|
167227
167270
|
|
|
167228
167271
|
plots.generalUpdatePerTraceModule = function(gd, subplot, subplotCalcData, subplotLayout) {
|
|
@@ -204568,6 +204611,7 @@ function subplotUpdateFx(gd, index) {
|
|
|
204568
204611
|
var dragMode = fullLayout.dragmode;
|
|
204569
204612
|
var cursor = fullLayout.dragmode === 'pan' ? 'move' : 'crosshair';
|
|
204570
204613
|
var bgRect = trace._bgRect;
|
|
204614
|
+
if(!bgRect) return;
|
|
204571
204615
|
|
|
204572
204616
|
if(dragMode === 'pan' || dragMode === 'zoom') return;
|
|
204573
204617
|
|
|
@@ -226275,7 +226319,7 @@ function getSortFunc(opts, d2c) {
|
|
|
226275
226319
|
'use strict';
|
|
226276
226320
|
|
|
226277
226321
|
// package version injected by `npm run preprocess`
|
|
226278
|
-
exports.version = '2.13.
|
|
226322
|
+
exports.version = '2.13.3';
|
|
226279
226323
|
|
|
226280
226324
|
},{}],1133:[function(_dereq_,module,exports){
|
|
226281
226325
|
(function (global){(function (){
|