From 79a94dabd444a17721910a0772a3344ef02f0003 Mon Sep 17 00:00:00 2001 From: Eirik Vullum Date: Thu, 6 Jun 2024 16:09:22 +0200 Subject: [PATCH 1/3] Limit range before mapping to number --- src/plots/cartesian/dragbox.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plots/cartesian/dragbox.js b/src/plots/cartesian/dragbox.js index 5446277b847..f8fa211ad8f 100644 --- a/src/plots/cartesian/dragbox.js +++ b/src/plots/cartesian/dragbox.js @@ -886,14 +886,11 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) { ya = sp.yaxis; if(sp._scene) { - var xrng = Lib.simpleMap(xa.range, xa.r2l); - var yrng = Lib.simpleMap(ya.range, ya.r2l); - if(xa.limitRange) xa.limitRange(); if(ya.limitRange) ya.limitRange(); - xrng = xa.range; - yrng = ya.range; + var xrng = Lib.simpleMap(xa.range, xa.r2l); + var yrng = Lib.simpleMap(ya.range, ya.r2l); sp._scene.update({range: [xrng[0], yrng[0], xrng[1], yrng[1]]}); } From 65dcaff1911ab103379c300c36cacc34aa6f1cba Mon Sep 17 00:00:00 2001 From: Eirik Vullum Date: Thu, 6 Jun 2024 16:22:21 +0200 Subject: [PATCH 2/3] Add draftlog --- draftlogs/7018_fix.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 draftlogs/7018_fix.md diff --git a/draftlogs/7018_fix.md b/draftlogs/7018_fix.md new file mode 100644 index 00000000000..6a2ed61959c --- /dev/null +++ b/draftlogs/7018_fix.md @@ -0,0 +1 @@ + - Fix disappearing traces when using `scattergl` and `xaxis.type: 'date'` [[#7018](https://github.com/plotly/plotly.js/pull/7018)] From 4b8d0c9111f82401f3c4b25ece4536fb2dbe94d7 Mon Sep 17 00:00:00 2001 From: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:11:18 -0400 Subject: [PATCH 3/3] Update draftlogs/7018_fix.md --- draftlogs/7018_fix.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draftlogs/7018_fix.md b/draftlogs/7018_fix.md index 6a2ed61959c..83ad3eb1e7e 100644 --- a/draftlogs/7018_fix.md +++ b/draftlogs/7018_fix.md @@ -1 +1,2 @@ - - Fix disappearing traces when using `scattergl` and `xaxis.type: 'date'` [[#7018](https://github.com/plotly/plotly.js/pull/7018)] + - Fix displaying scattergl traces while zooming or panning (regression introduced in 2.26.0) [[#7018](https://github.com/plotly/plotly.js/pull/7018)], + with thanks to @eiriklv for the contribution!