Made some naming changes to Label-related operations.

This commit is contained in:
n1474335 2017-12-19 13:18:25 +00:00
parent b48e940f2d
commit 12fc8c22dd
4 changed files with 31 additions and 34 deletions

View file

@ -216,29 +216,6 @@ const FlowControl = {
return state;
},
/**
* Returns the index of a label.
*
* @param {Object} state
* @param {string} name
* @returns {number}
*/
_getLabelIndex: function(name, state) {
let index = -1;
for (let o = 0; o < state.opList.length; o++) {
let operation = state.opList[o];
if (operation.getConfig().op === "Label"){
let ings = operation.getIngValues();
if (name === ings[0]) {
index = o;
break;
}
}
}
return index;
},
/**
* Return operation.
@ -268,6 +245,26 @@ const FlowControl = {
return state;
},
/**
* Returns the index of a label.
*
* @param {Object} state
* @param {string} name
* @returns {number}
*/
_getLabelIndex: function(name, state) {
for (let o = 0; o < state.opList.length; o++) {
let operation = state.opList[o];
if (operation.name === "Label"){
let ings = operation.getIngValues();
if (name === ings[0]) {
return o;
}
}
}
return -1;
},
};
export default FlowControl;