Changeset 0c6b92a for imaps-frontend/node_modules/konva/lib/Validators.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/konva/lib/Validators.js
rd565449 r0c6b92a 1 1 "use strict"; 2 2 Object.defineProperty(exports, "__esModule", { value: true }); 3 exports.getComponentValidator = exports.getBooleanValidator = exports.getNumberArrayValidator = exports.getFunctionValidator = exports.getStringOrGradientValidator = exports.getStringValidator = exports.getNumberOrAutoValidator = exports.getNumberOrArrayOfNumbersValidator = exports.getNumberValidator = exports.alphaComponent = exports.RGBComponent = void 0; 3 exports.RGBComponent = RGBComponent; 4 exports.alphaComponent = alphaComponent; 5 exports.getNumberValidator = getNumberValidator; 6 exports.getNumberOrArrayOfNumbersValidator = getNumberOrArrayOfNumbersValidator; 7 exports.getNumberOrAutoValidator = getNumberOrAutoValidator; 8 exports.getStringValidator = getStringValidator; 9 exports.getStringOrGradientValidator = getStringOrGradientValidator; 10 exports.getFunctionValidator = getFunctionValidator; 11 exports.getNumberArrayValidator = getNumberArrayValidator; 12 exports.getBooleanValidator = getBooleanValidator; 13 exports.getComponentValidator = getComponentValidator; 4 14 const Global_1 = require("./Global"); 5 15 const Util_1 = require("./Util"); … … 25 35 return Math.round(val); 26 36 } 27 exports.RGBComponent = RGBComponent;28 37 function alphaComponent(val) { 29 38 if (val > 1) { … … 35 44 return val; 36 45 } 37 exports.alphaComponent = alphaComponent;38 46 function getNumberValidator() { 39 47 if (Global_1.Konva.isUnminified) { … … 49 57 } 50 58 } 51 exports.getNumberValidator = getNumberValidator;52 59 function getNumberOrArrayOfNumbersValidator(noOfElements) { 53 60 if (Global_1.Konva.isUnminified) { 54 61 return function (val, attr) { 55 let isNumber = Util_1.Util._isNumber(val);56 let isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements;62 const isNumber = Util_1.Util._isNumber(val); 63 const isValidArray = Util_1.Util._isArray(val) && val.length == noOfElements; 57 64 if (!isNumber && !isValidArray) { 58 65 Util_1.Util.warn(_formatValue(val) + … … 67 74 } 68 75 } 69 exports.getNumberOrArrayOfNumbersValidator = getNumberOrArrayOfNumbersValidator;70 76 function getNumberOrAutoValidator() { 71 77 if (Global_1.Konva.isUnminified) { 72 78 return function (val, attr) { 73 varisNumber = Util_1.Util._isNumber(val);74 varisAuto = val === 'auto';79 const isNumber = Util_1.Util._isNumber(val); 80 const isAuto = val === 'auto'; 75 81 if (!(isNumber || isAuto)) { 76 82 Util_1.Util.warn(_formatValue(val) + … … 83 89 } 84 90 } 85 exports.getNumberOrAutoValidator = getNumberOrAutoValidator;86 91 function getStringValidator() { 87 92 if (Global_1.Konva.isUnminified) { … … 97 102 } 98 103 } 99 exports.getStringValidator = getStringValidator;100 104 function getStringOrGradientValidator() { 101 105 if (Global_1.Konva.isUnminified) { … … 114 118 } 115 119 } 116 exports.getStringOrGradientValidator = getStringOrGradientValidator;117 120 function getFunctionValidator() { 118 121 if (Global_1.Konva.isUnminified) { … … 128 131 } 129 132 } 130 exports.getFunctionValidator = getFunctionValidator;131 133 function getNumberArrayValidator() { 132 134 if (Global_1.Konva.isUnminified) { … … 157 159 } 158 160 } 159 exports.getNumberArrayValidator = getNumberArrayValidator;160 161 function getBooleanValidator() { 161 162 if (Global_1.Konva.isUnminified) { 162 163 return function (val, attr) { 163 varisBool = val === true || val === false;164 const isBool = val === true || val === false; 164 165 if (!isBool) { 165 166 Util_1.Util.warn(_formatValue(val) + … … 172 173 } 173 174 } 174 exports.getBooleanValidator = getBooleanValidator;175 175 function getComponentValidator(components) { 176 176 if (Global_1.Konva.isUnminified) { … … 190 190 } 191 191 } 192 exports.getComponentValidator = getComponentValidator;
Note:
See TracChangeset
for help on using the changeset viewer.