Skip to content

Commit

Permalink
Labels are now hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Adhitya Kamakshidasan committed Aug 5, 2015
1 parent f339c40 commit b60cf1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Expand Up @@ -522,7 +522,7 @@ else if ("Box".equals(symbolType)) {
writeLine(" <Transform translation='" + (point.getX() + displacementX) + " " + (point.getY() + displacementY) + " " + (point.getZ() + displacementZ)+ "'"
+ " scale='" + svgMap.get("font-size") + " " + svgMap.get("font-size") + " " + svgMap.get("font-size") + "'>");
writeLine(" <Billboard axisOfRotation='"+billboardAxis+"'>");
writeLine(" <Shape DEF=\"labelText\" data-class=\"information\">");
writeLine(" <Shape id = \"featureLabel"+indexPoint+"\" render=\"true\" DEF=\"labelText\" data-class=\"information\">");
writeLine(" <Appearance>");
writeLine(" <Material diffuseColor=\"" + svgMap.get("fill") + "\"/>");
writeLine(" </Appearance>");
Expand Down
15 changes: 13 additions & 2 deletions src/main/resources/Javascript/script.js
Expand Up @@ -574,15 +574,22 @@
var feature = document.getElementById(x);
feature.setAttribute('diffuseColor', getHighlightColor());
feature.setAttribute('emissiveColor', getHighlightGlow());
}

var y = "featureLabel" + indices[i];
var label = document.getElementById(y);
label.setAttribute('render', 'false');
}
restorePreviousFeatures(indices);
}

function restoreFeatures(){
for ( var i = 0; i < getIndexSize(); i++ ) {
feature_id = "feature" + (i+1);
var feature_id = "feature" + (i+1);
document.getElementById(feature_id).setAttribute('diffuseColor', getNormalColor());
document.getElementById(feature_id).setAttribute('emissiveColor', getNormalGlow());

var y = "featureLabel" + (i+1);
document.getElementById(y).setAttribute('render', 'true');
}
}

Expand All @@ -597,6 +604,10 @@
var feature = document.getElementById(x);
feature.setAttribute('diffuseColor', getNormalColor());
feature.setAttribute('emissiveColor', getNormalGlow());

var y = "featureLabel" + indices[i];
var label = document.getElementById(y);
label.setAttribute('render', 'false');
}
}

Expand Down

0 comments on commit b60cf1f

Please sign in to comment.