question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’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 localhost-3000-photo ipad pro localhost-3000-photo iphone 6

Using iPhone 6 you don’t really know what part of the img are you going to crop as I said.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thedustinsmithcommented, Jul 17, 2017

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.

0reactions
liran-cocommented, Nov 1, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found