Skip to content

Expand Image gets stuck when showing a wide but short image. #9349

@alanyoungCN

Description

@alanyoungCN

Environment data

  • VS Code version: 1.65.2 (Universal)
  • Jupyter Extension version: v2022.2.1030672458
  • Python Extension version: v2022.2.1924087327
  • OS: MacOS
  • Python version: 3.9
  • Type of virtual environment used: virtualenv
  • Jupyter server running: Local

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.
Mar-14-2022 11-10-02

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?

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugplot-viewer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions