Skip to content

responsive: true breaks scrollZoom: true #3337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IvanJosipovic opened this issue Dec 14, 2018 · 2 comments · Fixed by #3424
Closed

responsive: true breaks scrollZoom: true #3337

IvanJosipovic opened this issue Dec 14, 2018 · 2 comments · Fixed by #3424
Labels
bug something broken

Comments

@IvanJosipovic
Copy link

IvanJosipovic commented Dec 14, 2018

With the version 1.42.5 of plotly.js enabling responsive: true breaks scrollZoom: true

Working:
https://codepen.io/anon/pen/YdqpoO

Broken:
https://codepen.io/anon/pen/REaozq

@IvanJosipovic IvanJosipovic changed the title responsive: true breaks scroolZoom: true responsive: true breaks scrollZoom: true Dec 14, 2018
@etpinard etpinard added the bug something broken label Dec 14, 2018
@etpinard
Copy link
Contributor

Probably from the same weird block identified in #3085

// if the plot has scrollbars (more than a tiny excess)
// disable scrollzoom too.
if(pc.scrollHeight - pc.clientHeight > 10 ||
pc.scrollWidth - pc.clientWidth > 10) {
return;
}

@etpinard
Copy link
Contributor

etpinard commented Jan 9, 2019

Commenting out:

// if the plot has scrollbars (more than a tiny excess)
// disable scrollzoom too.
if(pc.scrollHeight - pc.clientHeight > 10 ||
pc.scrollWidth - pc.clientWidth > 10) {
return;
}

indeed "fixes" this bug. I'll try to get patch similar to #3085 merged in time for v1.44.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants