MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / maxChange

Function maxChange

lib/test/angular/1.7.0/angular.js:26235–26255  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

26233 }
26234
26235 function maxChange(val) {
26236 maxVal = parseNumberAttrVal(val);
26237 // ignore changes before model is initialized
26238 if (isNumberNaN(ctrl.$modelValue)) {
26239 return;
26240 }
26241
26242 if (supportsRange) {
26243 var elVal = element.val();
26244 // IE11 doesn't set the el val correctly if the maxVal is less than the element value
26245 if (maxVal < elVal) {
26246 element.val(maxVal);
26247 // IE11 and Chrome don't set the value to the minVal when max < min
26248 elVal = maxVal < minVal ? minVal : maxVal;
26249 }
26250 ctrl.$setViewValue(elVal);
26251 } else {
26252 // TODO(matsko): implement validateLater to reduce number of validations
26253 ctrl.$validate();
26254 }
26255 }
26256
26257 function stepChange(val) {
26258 stepVal = parseNumberAttrVal(val);

Callers

nothing calls this directly

Calls 1

parseNumberAttrValFunction · 0.70

Tested by

no test coverage detected