Commit 58011595 authored by BujarMuharemi's avatar BujarMuharemi
Browse files

roof shadow color get reset, when changing modes

parent 0468704c
......@@ -273,7 +273,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
//Surface View
if (document.getElementById("surface").checked) {
resetRoofColors();
//save the selected feature's original color
if (pickedhigh) {
highlightedFeatures.forEach(h => {
......@@ -339,6 +339,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
//Building View
else if(document.getElementById("building").checked){
resetRoofColors();
//save the selected feature's original color
if (pickedhigh) {
highlightedFeatures.forEach(h => {
......@@ -480,3 +481,16 @@ function fillTableProperties(gID, sID) {
}
}
function resetRoofColors(){
tileContent.forEach(t => {
if(t.getProperty("description").includes("Roof")){
for (const [key, value] of Object.entries(shadowdata)) {
if(key === t.getProperty("gml_id")){
t.color = Cesium.Color.WHITE;
}
}
}
});
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment