(inputDefine, inputRecorder)
| 897 | } |
| 898 | |
| 899 | function createInputByDefine(inputDefine, inputRecorder) { |
| 900 | if (!inputDefine) { |
| 901 | return; |
| 902 | } |
| 903 | var inputType = inputDefine.hasOwnProperty('type') ? inputDefine.type : 'button'; |
| 904 | |
| 905 | if (arrayIndexOf(NAMES_TYPE_RANGE, inputType) >= 0) { |
| 906 | return createRangeInput(inputDefine, null, inputRecorder); |
| 907 | } |
| 908 | else if (arrayIndexOf(NAMES_TYPE_SELECT, inputType) >= 0) { |
| 909 | return createSelectInput(inputDefine, inputRecorder); |
| 910 | } |
| 911 | else if (arrayIndexOf(NAMES_TYPE_BR, inputType) >= 0) { |
| 912 | return createBr(inputDefine, inputRecorder); |
| 913 | } |
| 914 | else if (arrayIndexOf(NAMES_TYPE_HR, inputType) >= 0) { |
| 915 | return createHr(inputDefine, inputRecorder); |
| 916 | } |
| 917 | else if (arrayIndexOf(NAMES_TYPE_BUTTON, inputType) >= 0) { |
| 918 | return createButtonInput(inputDefine, inputRecorder); |
| 919 | } |
| 920 | else if (arrayIndexOf(NAMES_TYPE_GROUP_SET, inputType) >= 0) { |
| 921 | return createGroupSetInput(inputDefine, inputRecorder); |
| 922 | } |
| 923 | else { |
| 924 | throw new Error(errMsgPrefix + ' Unsupported button type: ' + inputType); |
| 925 | } |
| 926 | } |
| 927 | |
| 928 | function createRangeInput(inputDefine, internallyForceDef, inputRecorder) { |
| 929 | var _currVal = +retrieveValue(inputDefine.value, 0); |
no test coverage detected
searching dependent graphs…