Added * category by default curves settings
This commit is contained in:
@ -48,9 +48,24 @@ class CurvesSettingsPopup extends HTMLElement{
|
||||
let configurationLineObject = this.getRowValues(row);
|
||||
let formmatedLineConfiguration = {...configurationLineObject};
|
||||
|
||||
if(!formmatedLineConfiguration.hasOwnProperty("variable") && Object.keys(formmatedLineConfiguration).length > 0){
|
||||
alertify.error("Variable not defined for some row(s).");
|
||||
throw Error;
|
||||
if(!formmatedLineConfiguration.hasOwnProperty("variable")){
|
||||
let definedFields = Object.keys(formmatedLineConfiguration).length;
|
||||
if(formmatedLineConfiguration.hasOwnProperty("cat")){
|
||||
if(formmatedLineConfiguration["cat"] === "*"){
|
||||
if (definedFields >= 2){
|
||||
alertify.error("Variable not defined for some row(s).");
|
||||
throw Error;
|
||||
}
|
||||
}else{
|
||||
alertify.error("Variable not defined for some row(s).");
|
||||
throw Error;
|
||||
}
|
||||
}else{
|
||||
if (definedFields > 0){
|
||||
alertify.error("Variable not defined for some row(s).");
|
||||
throw Error;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
let key = formmatedLineConfiguration["variable"];
|
||||
delete formmatedLineConfiguration["variable"];
|
||||
@ -200,6 +215,9 @@ class CurvesSettingsPopup extends HTMLElement{
|
||||
input.name = type;
|
||||
input.classList.add("text-input");
|
||||
input.value = "";
|
||||
if (type == "cat"){
|
||||
input.value = "*";
|
||||
}
|
||||
if(lineConfiguration != null && lineConfiguration.hasOwnProperty(type)){
|
||||
input.value = lineConfiguration[type];
|
||||
}
|
||||
|
Reference in New Issue
Block a user