Skip to content

Commit 0625c65

Browse files
authored
Merge pull request plotly#7233 from plotly/release-v2.35.3
Merge `release-v2.35.3` dev branch to master to include recent fixes
2 parents c15fd07 + de644bb commit 0625c65

File tree

15 files changed

+164
-16
lines changed

15 files changed

+164
-16
lines changed

draftlogs/7164_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Allow null or broken selection objects without throwing an error [[#7164](https://github.com/plotly/plotly.js/pull/7164)]

draftlogs/7167_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Render scatterternary traces correctly if they have the `ids` attribute [[#7164](https://github.com/plotly/plotly.js/pull/7164)]

draftlogs/7199_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Do not convert url-sourced layout images to data uri unless we're in staticPlot mode, to improve interactivity when images are changed with zoom/pan [[#7199](https://github.com/plotly/plotly.js/pull/7199)]

draftlogs/7204_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix mablibre source map [[#7204](https://github.com/plotly/plotly.js/pull/7204)]

draftlogs/7205_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix years in license [[#7205](https://github.com/plotly/plotly.js/pull/7205)]

src/components/images/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = function draw(gd) {
7373

7474
thisImage.attr('xmlns', xmlnsNamespaces.svg);
7575

76-
if(d.source && d.source.slice(0, 5) === 'data:') {
76+
if(!gd._context.staticPlot || (d.source && d.source.slice(0, 5) === 'data:')) {
7777
thisImage.attr('xlink:href', d.source);
7878
this._imgSrc = d.source;
7979
} else {

src/components/selections/select.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ function prepSelect(evt, startX, startY, dragOptions, mode) {
182182
for(var q = 0; q < selections.length; q++) {
183183
var s = fullLayout.selections[q];
184184
if(
185+
!s ||
185186
s.xref !== xRef ||
186187
s.yref !== yRef
187188
) {

src/plots/cartesian/index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,10 @@ function makeSubplotLayer(gd, plotinfo) {
568568
var yLayer = constants.layerValue2layerClass[plotinfo.yaxis.layer];
569569
var hasOnlyLargeSploms = fullLayout._hasOnlyLargeSploms;
570570

571-
if(!plotinfo.mainplot || fullLayout._zindices.length > 1) {
571+
var hasMultipleZ = fullLayout._zindices.length > 1;
572+
var mainplotinfo = plotinfo.mainplotinfo;
573+
574+
if(!plotinfo.mainplot || hasMultipleZ) {
572575
if(hasOnlyLargeSploms) {
573576
// TODO could do even better
574577
// - we don't need plot (but we would have to mock it in lsInner
@@ -585,9 +588,15 @@ function makeSubplotLayer(gd, plotinfo) {
585588
plotinfo.shapelayer = ensureSingle(backLayer, 'g', 'shapelayer');
586589
plotinfo.imagelayer = ensureSingle(backLayer, 'g', 'imagelayer');
587590

588-
plotinfo.minorGridlayer = ensureSingle(plotgroup, 'g', 'minor-gridlayer');
589-
plotinfo.gridlayer = ensureSingle(plotgroup, 'g', 'gridlayer');
590-
plotinfo.zerolinelayer = ensureSingle(plotgroup, 'g', 'zerolinelayer');
591+
if(mainplotinfo && hasMultipleZ) {
592+
plotinfo.minorGridlayer = mainplotinfo.minorGridlayer;
593+
plotinfo.gridlayer = mainplotinfo.gridlayer;
594+
plotinfo.zerolinelayer = mainplotinfo.zerolinelayer;
595+
} else {
596+
plotinfo.minorGridlayer = ensureSingle(plotgroup, 'g', 'minor-gridlayer');
597+
plotinfo.gridlayer = ensureSingle(plotgroup, 'g', 'gridlayer');
598+
plotinfo.zerolinelayer = ensureSingle(plotgroup, 'g', 'zerolinelayer');
599+
}
591600

592601
var betweenLayer = ensureSingle(plotgroup, 'g', 'layer-between');
593602
plotinfo.shapelayerBetween = ensureSingle(betweenLayer, 'g', 'shapelayer');
@@ -622,7 +631,6 @@ function makeSubplotLayer(gd, plotinfo) {
622631
}
623632
}
624633
} else {
625-
var mainplotinfo = plotinfo.mainplotinfo;
626634
var mainplotgroup = mainplotinfo.plotgroup;
627635
var xId = id + '-x';
628636
var yId = id + '-y';

src/plots/map/map.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var maplibregl = require('maplibre-gl/dist/maplibre-gl-unminified');
3+
var maplibregl = require('maplibre-gl');
44

55
var Lib = require('../../lib');
66
var geoUtils = require('../../lib/geo_location_utils');

src/traces/scatterternary/calc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = function calc(gd, trace) {
1515
var displaySum = ternary.sum;
1616
var normSum = trace.sum || displaySum;
1717
var arrays = {a: trace.a, b: trace.b, c: trace.c};
18+
var ids = trace.ids;
1819

1920
var i, j, dataArray, newArray, fillArray1, fillArray2;
2021

@@ -58,6 +59,9 @@ module.exports = function calc(gd, trace) {
5859
y = a;
5960
x = c - b;
6061
cd[i] = {x: x, y: y, a: a, b: b, c: c};
62+
if (ids) {
63+
cd[i].id = ids[i];
64+
}
6165
} else cd[i] = {x: false, y: false};
6266
}
6367

0 commit comments

Comments
 (0)