Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed May 6, 2024
1 parent 910bae2 commit c7ab0ce
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/sparqlunicorn_ontdoc/resources/html/default/js/startscripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1698,19 +1698,21 @@ function getColor(feature,propertyName,propertyValue,rangesByAttribute){
if(propertyName=="None"){
return "#000000"
}
if(!isNaN(propertyValue)){
if(!isNaN(propertyValue) && propertyName in rangesByAttribute){
propNum=Number(propertyValue)
for(rang in rangesByAttribute){
if("min" in rangesByAttribute[rang] && "max" in rangesByAttribute[rang]){
if(propNum>=rangesByAttribute[rang]["min"] && propNum<=rangesByAttribute[rang]["max"]){
return rangesByAttribute[rang]["color"];
for(therange of rangesByAttribute[propertyName]){
if("min" in therange && "max" in therange){
if(propNum>=therange["min"] && propNum<=therange["max"]){
return therange["color"];
}
}
}
}else{
for(rang in rangesByAttribute){
if(rangesByAttribute[rang]["label"]==propertyValue){
return rangesByAttribute[rang]["color"]
if(propertyName in rangesByAttribute) {
for (rang of rangesByAttribute[propertyName]) {
if (rang["label"] == propertyValue) {
return rang["color"]
}
}
}
}
Expand Down

0 comments on commit c7ab0ce

Please sign in to comment.