MCPcopy Index your code
hub / github.com/apache/echarts / createGroupSetInput

Function createGroupSetInput

test/lib/testHelper.js:1397–1525  ·  view source on GitHub ↗
(groupSetDefine)

Source from the content-addressed store, hash-verified

1395 } // End of createSelectInput
1396
1397 function createGroupSetInput(groupSetDefine) {
1398 assert(
1399 getType(groupSetDefine.inputsHeight) === 'number',
1400 '`inputsHeight` is mandatory on groupSet to avoid height change'
1401 + ' to affects visual testing when switching groups.'
1402 )
1403 assert(
1404 getType(groupSetDefine.groups) === 'array',
1405 '.groups must be an array.'
1406 );
1407 assert(
1408 groupSetDefine.groups.length > 0,
1409 'groupset.group must have at least one group'
1410 );
1411
1412 var groupSetEl = document.createElement('div');
1413 initInputsContainer(groupSetEl, groupSetDefine, {
1414 ignoreInputsStyle: true,
1415 className: 'test-inputs-groupset',
1416 });
1417 var groupSetMarginBottomEl = document.createElement('div');
1418 groupSetMarginBottomEl.className = 'test-inputs-groupset-margin-bottom';
1419
1420 var groupSetTextEl = document.createElement('div');
1421 groupSetTextEl.className = 'test-inputs-groupset-text';
1422 groupSetEl.appendChild(groupSetTextEl);
1423
1424 var groupSetCreated = {
1425 currentGroupIndex: 0,
1426 elList: [groupSetEl, groupSetMarginBottomEl],
1427 children: [],
1428 getState: getGroupSetInputState,
1429 setState: setGroupSetInputState,
1430 switchGroup: switchGroup
1431 };
1432
1433 for (var groupIdx = 0; groupIdx < groupSetDefine.groups.length; groupIdx++) {
1434 var groupDefine = groupSetDefine.groups[groupIdx];
1435 assert(groupDefine, 'groupset.group must not be undefined/null.');
1436
1437 var groupChildInputsContainer = document.createElement('div');
1438 initInputsContainer(groupChildInputsContainer, groupSetDefine, {
1439 ignoreFixHeight: true,
1440 className: 'test-inputs-groupset-group',
1441 });
1442 groupSetEl.appendChild(groupChildInputsContainer);
1443
1444 var groupChildId = retrieveId(groupDefine, 'id');
1445 if (groupChildId == null) {
1446 throw new Error('In group child input, id must be specified.');
1447 }
1448
1449 var groupCreated = {
1450 groupParent: groupSetCreated,
1451 inputsContainerEl: groupChildInputsContainer,
1452 groupSetTextEl: groupSetTextEl,
1453 groupDefine: groupDefine,
1454 idList: null,

Callers 1

createInputByDefineFunction · 0.85

Calls 8

initInputsContainerFunction · 0.85
retrieveIdFunction · 0.85
storeToInputDictFunction · 0.85
retrieveInputDefineListFunction · 0.85
dealInitEachInputFunction · 0.85
showHideGroupInGroupSetFunction · 0.85
assertFunction · 0.70
isObjectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…