UNPKG

@applitools/eyes

Version:
103 lines (102 loc) 3.49 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExactMatchSettingsData = void 0; const utils = __importStar(require("@applitools/utils")); /** @undocumented */ class ExactMatchSettingsData { constructor(settings) { this._settings = {}; this.minDiffIntensity = settings.minDiffIntensity; this.minDiffWidth = settings.minDiffWidth; this.minDiffHeight = settings.minDiffHeight; this.matchThreshold = settings.matchThreshold; } get minDiffIntensity() { return this._settings.minDiffIntensity; } set minDiffIntensity(minDiffIntensity) { utils.guard.isNumber(minDiffIntensity, { name: 'minDiffIntensity', strict: false }); this._settings.minDiffIntensity = minDiffIntensity; } getMinDiffIntensity() { return this.minDiffIntensity; } setMinDiffIntensity(value) { this.minDiffIntensity = value; } get minDiffWidth() { return this._settings.minDiffWidth; } set minDiffWidth(minDiffWidth) { utils.guard.isNumber(minDiffWidth, { name: 'minDiffWidth', strict: false }); this._settings.minDiffWidth = minDiffWidth; } getMinDiffWidth() { return this.minDiffWidth; } setMinDiffWidth(value) { this.minDiffWidth = value; } get minDiffHeight() { return this._settings.minDiffHeight; } set minDiffHeight(minDiffHeight) { utils.guard.isNumber(minDiffHeight, { name: 'minDiffHeight', strict: false }); this._settings.minDiffHeight = minDiffHeight; } getMinDiffHeight() { return this.minDiffHeight; } setMinDiffHeight(value) { this.minDiffHeight = value; } get matchThreshold() { return this._settings.matchThreshold; } set matchThreshold(matchThreshold) { utils.guard.isNumber(matchThreshold, { name: 'matchThreshold', strict: false }); this._settings.matchThreshold = matchThreshold; } getMatchThreshold() { return this.matchThreshold; } setMatchThreshold(value) { this.matchThreshold = value; } /** @internal */ toObject() { return this._settings; } /** @internal */ toJSON() { return utils.general.toJSON(this._settings); } /** @internal */ toString() { return utils.general.toString(this); } } exports.ExactMatchSettingsData = ExactMatchSettingsData;