Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 81a5e4f

Browse files
author
Zdravko
authored
Merge pull request #273 from NativeScript/zbranzov/fix-compareElement
fix: compareElement to use proper rectangle and generate proper diff ...
2 parents d7d71d9 + cd76798 commit 81a5e4f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎lib/image-helper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ export class ImageHelper {
314314

315315
public compareImages(options: IImageCompareOptions, actual: string, expected: string, output: string) {
316316
const clipRect = {
317-
x: this.options.cropRectangle.x,
318-
y: this.options.cropRectangle.y,
319-
width: this.options.cropRectangle.width,
320-
height: this.options.cropRectangle.height
317+
x: options.cropRectangle.x,
318+
y: options.cropRectangle.y,
319+
width: options.cropRectangle.width,
320+
height: options.cropRectangle.height
321321
}
322322

323-
if (!this.options.keepOriginalImageSize) {
323+
if (!options.keepOriginalImageSize) {
324324
clipRect.x = 0;
325325
clipRect.y = 0;
326326
clipRect.width = undefined;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /