mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: change viewportHeight in screencast (#11583)
This commit is contained in:
parent
949f4e90ca
commit
107b8337e5
@ -2273,7 +2273,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const viewportWidth = width / devicePixelRatio;
|
const viewportWidth = width / devicePixelRatio;
|
||||||
const viewportHeight = width / devicePixelRatio;
|
const viewportHeight = height / devicePixelRatio;
|
||||||
if (x + cropWidth > viewportWidth) {
|
if (x + cropWidth > viewportWidth) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`\`crop.width\` cannot be larger than the viewport width (${viewportWidth}).`
|
`\`crop.width\` cannot be larger than the viewport width (${viewportWidth}).`
|
||||||
|
Loading…
Reference in New Issue
Block a user