looks-same
Advanced tools
Comparing version 5.1.0 to 6.0.0
@@ -64,3 +64,5 @@ // Type definitions for looks-same 5.0 | ||
/** | ||
* For visual regression tasks it may be useful to ignore text caret in text input elements. You can do it with ignoreCaret option. | ||
* Text caret in text input elements it is a pain for visual regression tasks, because it is always blinks. | ||
* These diffs will be ignored by default. You can use `ignoreCaret` option with `false` value to disable ignoring such diffs. | ||
* In that way text caret will be marked as diffs. | ||
*/ | ||
@@ -116,2 +118,6 @@ ignoreCaret?: boolean; | ||
/** | ||
* makes the search algorithm of the antialiasing less strict | ||
*/ | ||
antialiasingTolerance?: number; | ||
/** | ||
* Ability to ignore antialiasing | ||
@@ -123,3 +129,3 @@ */ | ||
*/ | ||
ignoreCaret?: false; | ||
ignoreCaret?: boolean; | ||
} | ||
@@ -126,0 +132,0 @@ |
@@ -124,2 +124,3 @@ 'use strict'; | ||
_.defaults(opts, { | ||
ignoreCaret: true, | ||
ignoreAntialiasing: true, | ||
@@ -203,3 +204,3 @@ antialiasingTolerance: 0 | ||
exports.createDiff = function saveDiff(opts, callback) { | ||
opts.tolerance = getToleranceFromOpts(opts); | ||
prepareOpts(opts); | ||
@@ -206,0 +207,0 @@ readPair(opts.reference, opts.current, (error, {first, second}) => { |
{ | ||
"name": "looks-same", | ||
"version": "5.1.0", | ||
"version": "6.0.0", | ||
"description": "Pure node.js library for comparing PNG-images, taking into account human color perception.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -57,4 +57,3 @@ # LooksSame | ||
For visual regression tasks it may be useful to ignore text caret in text input elements. | ||
You can do it with `ignoreCaret` option. | ||
Text caret in text input elements it is a pain for visual regression tasks, because it is always blinks. These diffs will be ignored by default. You can use `ignoreCaret` option with `false` value to disable ignoring such diffs. In that way text caret will be marked as diffs. | ||
@@ -112,4 +111,5 @@ ```javascript | ||
tolerance: 2.5, | ||
ignoreAntialiasing: false, // do not ignore antialising by default | ||
ignoreCaret: false // do not ignore caret by default | ||
antialiasingTolerance: 0, | ||
ignoreAntialiasing: true, // ignore antialising by default | ||
ignoreCaret: true // ignore caret by default | ||
}, function(error) { | ||
@@ -116,0 +116,0 @@ ... |
37436
836