@applitools/screenshoter
Advanced tools
Comparing version 3.7.1 to 3.7.2
{ | ||
"name": "@applitools/screenshoter", | ||
"version": "3.7.1", | ||
"version": "3.7.2", | ||
"description": "Applitools universal screenshoter for web and native applications", | ||
@@ -75,3 +75,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@applitools/image": "1.0.4", | ||
"@applitools/image": "1.0.5", | ||
"@applitools/logger": "1.1.27", | ||
@@ -78,0 +78,0 @@ "@applitools/snippets": "2.4.6", |
@@ -6,13 +6,6 @@ const utils = require('@applitools/utils') | ||
const screenshotRegion = utils.geometry.region(cropRegion, stitchedImage.size) | ||
if (JSON.stringify(preMoveOffset) === JSON.stringify(postMoveOffset)) return screenshotRegion | ||
const moveOffset = utils.geometry.offsetNegative(postMoveOffset, preMoveOffset) | ||
const compensatedScreenshotRegion = utils.geometry.offset(screenshotRegion, moveOffset) | ||
if (preMoveOffset.y === postMoveOffset.y && preMoveOffset.x !== postMoveOffset.x) | ||
compensatedScreenshotRegion.x = preMoveOffset.x | ||
return compensatedScreenshotRegion | ||
return utils.geometry.offset(screenshotRegion, moveOffset) | ||
} | ||
module.exports = calculateScreenshotRegion |
@@ -6,3 +6,3 @@ const {makeLogger} = require('@applitools/logger') | ||
const takeSimpleScreenshot = require('./take-simple-screenshot') | ||
const extractCoodinatesForSelectorsAndElements = require('./extract-coodinates-for-selectors-and-elements') | ||
const extractCoordinatesForSelectorsAndElements = require('./extract-coordinates-for-selectors-and-elements') | ||
@@ -96,3 +96,8 @@ async function takeScreenshot({ | ||
const calculatedRegions = await extractCoodinatesForSelectorsAndElements({regionsToCalculate, screenshot, context}) | ||
const calculatedRegions = await extractCoordinatesForSelectorsAndElements({ | ||
regionsToCalculate, | ||
screenshot, | ||
context, | ||
logger, | ||
}) | ||
@@ -99,0 +104,0 @@ if (hooks && hooks.afterScreenshot) { |
@@ -148,2 +148,3 @@ const utils = require('@applitools/utils') | ||
logger.verbose('restoring scroller state', scrollerState) | ||
await scroller.restoreState(scrollerState) | ||
@@ -150,0 +151,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52562
772
+ Added@applitools/image@1.0.5(transitive)
- Removed@applitools/image@1.0.4(transitive)
Updated@applitools/image@1.0.5