MCPcopy
hub / github.com/apache/echarts / disableInputs

Function disableInputs

test/lib/testHelper.js:508–542  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

506 }
507
508 function disableInputs(opt) {
509 assert(opt, '[disableInputs] requires parameters.');
510 var groupId = opt.groupId;
511 var inputId = opt.inputId;
512 assert(
513 groupId != null || inputId != null,
514 '[disableInputs] requires `groupId` or/and `inputId`.'
515 );
516 var inputIdList = [];
517 if (inputId != null) {
518 if (getType(inputId) !== 'array') {
519 inputId = [inputId];
520 }
521 for (var idx = 0; idx < inputId.length; idx++) {
522 var id = inputId[idx];
523 findInputCreatedAndCheck(id, {throw: true});
524 inputIdList.push(id);
525 }
526 }
527 if (groupId != null) {
528 if (getType(groupId) !== 'array') {
529 groupId = [groupId];
530 }
531 for (var idx = 0; idx < groupId.length; idx++) {
532 inputIdList = inputIdList.concat(retrieveAndVerifyGroup(groupId[idx]).idList);
533 }
534 }
535 var disabled = opt.disabled;
536 for (var idx = 0; idx < inputIdList.length; idx++) {
537 var id = inputIdList[idx];
538 if (_inputsDict[id].disable) {
539 _inputsDict[id].disable({disabled: disabled});
540 }
541 }
542 }
543 }
544
545 /**

Callers 1

makeDisableInputsFunction · 0.85

Calls 3

findInputCreatedAndCheckFunction · 0.85
retrieveAndVerifyGroupFunction · 0.85
assertFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…