MCPcopy Create free account
hub / github.com/choosehappy/QuickAnnotator / cachedToggleClass

Function cachedToggleClass

static/js/angular.js:25150–25158  ·  view source on GitHub ↗
(ctrl, className, switchValue)

Source from the content-addressed store, hash-verified

25148 }
25149
25150 function cachedToggleClass(ctrl, className, switchValue) {
25151 if (switchValue && !ctrl.$$classCache[className]) {
25152 ctrl.$$animate.addClass(ctrl.$$element, className);
25153 ctrl.$$classCache[className] = true;
25154 } else if (!switchValue && ctrl.$$classCache[className]) {
25155 ctrl.$$animate.removeClass(ctrl.$$element, className);
25156 ctrl.$$classCache[className] = false;
25157 }
25158 }
25159
25160 function toggleValidationCss(ctrl, validationErrorKey, isValid) {
25161 validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';

Callers 2

addSetValidityMethodFunction · 0.85
toggleValidationCssFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected