-
Notifications
You must be signed in to change notification settings - Fork 295
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
Expand Image gets stuck when showing a wide but short image. #9349
Comments
Please cc, @rchiodo @IanMatthewHuff @ericsnowcurrently 👀 |
I found that there is an issue in 2020 talking about that, which says using AutoSizer has been outdated. Then the author update the doc(https://github.com/chrvadala/react-svg-pan-zoom/blob/main/docs/autosizer-viewer.md) to tell how to use autosizer-viewer in a new way. I have tried editing the |
Thanks for filing this issue, I've been unable to repro this issue at my end, however I can see the issue from the recording. thanks. |
@DonJayamanne import numpy as np
import matplotlib.pyplot as plt
data = np.random.normal(0, 1, (900, 1))
fig, ax = plt.subplots(1, 1)
fig.dpi = 500
fig.set_size_inches(20, 1)
ax.plot(data) This code will plot the following figure: which you can see in the vs code like this Then you can expand the image and it looks like: Then you zoom it with wheel to the righter part, e.g. 800 around: |
I encountered the same issue, which can be reproduced with the code provided by the original poster. Is it possible to fix it in the future? Thanks! @DonJayamanne Environment data:
|
Environment data
Expected behaviour
The expand image can zoom and drag smoothly.
Actual behaviour / Steps to reproduce:
After I draw a very wide but short image to show a time series and click the Expand Image button, the preview will get stuck when I enlarge it and drag from right to left.
This is the full image and I can drag it well.
But when I enlarge the image, I can't see the right part anyway.
The screenshot above is the rightest I can drag.
However, the left blank becomes more.
I record a gif to show this issue.
the possible solution
I find that there is a <autosizer> outside the <ReactSVGPanZoom> in
svgViewer.tsx
(https://github.com/microsoft/vscode-jupyter/blob/main/src/datascience-ui/react-common/svgViewer.tsx), I think it's useless or at least the key, maybe we can remove it?The text was updated successfully, but these errors were encountered: