diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 13:30:24 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 13:30:24 +0100 |
commit | b43b4f25a8f195da2d54da9ebc5e415fb3b2a133 (patch) | |
tree | c07c07c10fdc94aa0e57a4f932b2eeaa0a4eed64 /devtools/shared/gcli | |
parent | 12ea5683594229407ae1852969b6417a59ae16e1 (diff) | |
download | uxp-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.tar.gz |
DevTools - gcli - screenshot - the vertical mode
https://github.com/MoonchildProductions/moebius/pull/166
Diffstat (limited to 'devtools/shared/gcli')
-rw-r--r-- | devtools/shared/gcli/commands/screenshot.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devtools/shared/gcli/commands/screenshot.js b/devtools/shared/gcli/commands/screenshot.js index e2f38b6d9e..11bafcab96 100644 --- a/devtools/shared/gcli/commands/screenshot.js +++ b/devtools/shared/gcli/commands/screenshot.js @@ -277,6 +277,12 @@ function createScreenshotData(document, args) { window.scrollTo(0,0); width = window.innerWidth + window.scrollMaxX - window.scrollMinX; height = window.innerHeight + window.scrollMaxY - window.scrollMinY; + let writingMode = "horizontal-tb"; + if (window.getComputedStyle(document.documentElement)) { + writingMode = window.getComputedStyle(document.documentElement).writingMode; + } + let orientation = writingMode.substring(0, writingMode.indexOf("-")).toLowerCase(); + left = ((orientation != "vertical") ? left : (-width + window.innerWidth)); filename = filename.replace(".png", "-fullpage.png"); } else if (args.selector) { |