Skip to content
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

Allow pinch to zoom when displaying an image #18987

Closed
tinganho opened this issue Jan 21, 2017 · 10 comments
Closed

Allow pinch to zoom when displaying an image #18987

tinganho opened this issue Jan 21, 2017 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-testplan workbench-editors Managing of editor widgets in workbench window
Milestone

Comments

@tinganho
Copy link

It would be great if you could support pinch to zoom when opening an image.

screen shot 2017-01-21 at 9 04 41 pm

@bpasero bpasero added the feature-request Request for new features or functionality label Jan 23, 2017
@bpasero bpasero removed their assignment Jan 23, 2017
@bpasero bpasero changed the title Pinch to zoom when opening an image Allow pinch to zoom when displaying an image Jan 23, 2017
@bschlenk
Copy link
Contributor

bschlenk commented Apr 6, 2017

This would be great. I'm working on an app that involves pixel art, so it would be helpful if I could zoom in on the images while viewing them. Additionally allowing the scaling algorithm to be configured, so pixel sprites didn't appear blurry when zoomed in.

@mjbvz mjbvz self-assigned this Nov 3, 2017
@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Nov 3, 2017
@pmartindev
Copy link

pmartindev commented Nov 3, 2017

@bschlenk Same. I am working on a similar project that involves < 50x50 pixel mazes. It's very tedious switching back and forth between apps just to enlarge the image.

@bpasero
Copy link
Member

bpasero commented Nov 16, 2017

This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable. Thanks for understanding and happy coding!

@bpasero
Copy link
Member

bpasero commented Nov 18, 2017

@tinganho @bschlenk @pmartindev how about when you click the image it just enlarges to fill the entire width of the editor? In the same way you can click an oversizes image to show its natural dimensions already.

@bschlenk
Copy link
Contributor

@bpasero that would be more consistent with the current behavior. But going full width might be too huge for images that are small. What if the image was applied as a background with background-size: contain? That way it would be fully visible in the window.

@tinganho
Copy link
Author

@bpasero certainly better than today, but not optimal. FYI, there is a pinch to zoom API in Chrome.

Figma are using it:
https://blog.figma.com/building-a-professional-design-tool-on-the-web-6332ed4f1fcc

@bschlenk
Copy link
Contributor

@tinganho See my pull request, that's exactly what I'm using #38538. But I think @bpasero's comment is more about keeping the interface consistent, not about implementation details.

@bpasero
Copy link
Member

bpasero commented Nov 19, 2017

@bschlenk @tinganho we could have both, clicking to toggle between normal and zoomed size (to be consistent with what we do currently with too large images) and pinching for the incremental zooming.

I think displaying an icon zoomed out of the box is not right because at first it should have its normal dimensions.

@bpasero bpasero reopened this Nov 19, 2017
@bpasero bpasero added workbench-editors Managing of editor widgets in workbench window and removed workbench labels Nov 19, 2017
@bschlenk
Copy link
Contributor

I have an idea but it would break the current behavior.

Images start out centered in the page and their natural size, or fit within the window if they are larger. Clicking the image zooms it in by some factor, and alt clicking zooms out (like photoshop). Pinch and ctrl + scroll do more fine grained zooming. This would keep both scenarios (undersized vs oversized images) consistent.

I don't think there is a good way to keep the behavior consistent while keeping the current behavior.

@bpasero bpasero self-assigned this Nov 27, 2017
@bpasero bpasero modified the milestones: November 2017, On Deck Nov 27, 2017
@bpasero bpasero removed this from the On Deck milestone Dec 7, 2017
@mjbvz mjbvz added this to the January 2018 milestone Jan 23, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Jan 23, 2018

Fixed by #38538

@mjbvz mjbvz closed this as completed Jan 23, 2018
@mjbvz mjbvz mentioned this issue Jan 25, 2018
3 tasks
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-testplan workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

7 participants