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) { ...@@ -273,7 +273,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
//Surface View //Surface View
if (document.getElementById("surface").checked) { if (document.getElementById("surface").checked) {
resetRoofColors();
//save the selected feature's original color //save the selected feature's original color
if (pickedhigh) { if (pickedhigh) {
highlightedFeatures.forEach(h => { highlightedFeatures.forEach(h => {
...@@ -339,6 +339,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) { ...@@ -339,6 +339,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
//Building View //Building View
else if(document.getElementById("building").checked){ else if(document.getElementById("building").checked){
resetRoofColors();
//save the selected feature's original color //save the selected feature's original color
if (pickedhigh) { if (pickedhigh) {
highlightedFeatures.forEach(h => { highlightedFeatures.forEach(h => {
...@@ -480,3 +481,16 @@ function fillTableProperties(gID, sID) { ...@@ -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;
}
}
}
});
}
Markdown is supported
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