Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
3DClient4SimStadtAPI
Commits
58011595
Commit
58011595
authored
Dec 04, 2021
by
BujarMuharemi
Browse files
roof shadow color get reset, when changing modes
parent
0468704c
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/js/globe.js
View file @
58011595
...
...
@@ -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
;
}
}
}
});
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment