Viewport size
See original GitHub issueI’m facing an “issue” with small devices.
If I specify a viewerport bigger than the screen size, the viewport canvas is not visible. This takes the correct sizes when you export the image but it’s a bit annoying if you’re using a small phone because you don’t know what you are cropping.
i.e I’ve got this parameters:
var opts = {
viewport: {
width: 400,
height: 400
},
enableOrientation: true
};
I took a couple screenshots with the browser, one using iPhone 6 and another one with iPad
Using iPhone 6 you don’t really know what part of the img are you going to crop as I said.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
What is my viewport
What Is My Viewport — A simple online tool for quickly finding the dimensions of your current device's viewport!
Read more >Viewport Sizes / What's my viewport size? | The Viewport Sizer ...
Viewport Sizer is a free handy tool for measuring your device's viewport sizes. Perfect for app and website developers, drag the window to...
Read more >Viewport Size for Devices | Screen Sizes, Phone ... - YesViz
Type Name Viewport SizePX Device Resolution PX Screen Size Pixel Ratio
Mobile Samsung S20 360 x 800 1440 x 3200 6.2″ 4.0
Mobile Samsung S10...
Read more >Viewport concepts - CSS: Cascading Style Sheets | MDN
The width property controls the size of the viewport. It should preferably be set to device-width , which is the width of the...
Read more >How Do I Use Mobile Viewports for Responsive Experiences?
A viewport is defined by the size of the rectangle filled by a web page on your screen. The viewport is the size...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I understand now.
The second “issue”, is a good idea, but I think a better place for it is in #207. Once we throw multiple items in one issue, I get lost in which one we’re talking about. Let’s leave #207 to focus on that.
I’ll get back to you on the first issue described. I have to give it some thought, I think I see what you’re saying though.
Any update on the first issue? I thought setting the result to ‘original’ was supposed to do this, but it doesn’t seem to be doing anything. I want the image size to retain itself, but cropped to the viewport. For example, if you had a 400x400 image and without any cropping, you get the result, it reduces the size to the viewport size which significantly degrades the quality.