Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f749a4a

Browse files
authored
Merge pull request #7018 from eiriklv/eiriklv/fix-gl-traces-disappering-when-zoom-pan
Fix issue where scattergl traces disappear while zooming or panning
2 parents 7ffcdd7 + 4b8d0c9 commit f749a4a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

‎draftlogs/7018_fix.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Fix displaying scattergl traces while zooming or panning (regression introduced in 2.26.0) [[#7018](https://github.com/plotly/plotly.js/pull/7018)],
2+
with thanks to @eiriklv for the contribution!

‎src/plots/cartesian/dragbox.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -886,14 +886,11 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
886886
ya = sp.yaxis;
887887

888888
if(sp._scene) {
889-
var xrng = Lib.simpleMap(xa.range, xa.r2l);
890-
var yrng = Lib.simpleMap(ya.range, ya.r2l);
891-
892889
if(xa.limitRange) xa.limitRange();
893890
if(ya.limitRange) ya.limitRange();
894891

895-
xrng = xa.range;
896-
yrng = ya.range;
892+
varxrng = Lib.simpleMap(xa.range,xa.r2l);
893+
varyrng = Lib.simpleMap(ya.range,ya.r2l);
897894

898895
sp._scene.update({range: [xrng[0], yrng[0], xrng[1], yrng[1]]});
899896
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /