Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanenkoVladimir committed Nov 27, 2020
1 parent bdad248 commit 9f0e096
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export class ThreeSceneService implements CodeMapPreRenderServiceSubscriber {
highlightBuildings() {
const state = this.storeService.getState()
this.getMapMesh().highlightBuilding(this.highlighted, this.selected, state, this.constantHighlight)
this.updateCorrectMaterial(this.mapGeometry.children[0]["material"], this.highlighted, false)
if (this.selected) this.updateCorrectMaterial(this.mapGeometry.children[0]["material"], [this.selected], true)
if (this.mapGeometry.children[0]) {
this.updateCorrectMaterial(this.mapGeometry.children[0]["material"], this.highlighted, false)
if (this.selected) this.updateCorrectMaterial(this.mapGeometry.children[0]["material"], [this.selected], true)
}
}

highlightBuildingsAfterSelect() {
Expand Down Expand Up @@ -129,7 +131,9 @@ export class ThreeSceneService implements CodeMapPreRenderServiceSubscriber {
clearHighlight() {
if (this.getMapMesh()) {
this.getMapMesh().clearHighlight(this.selected)
this.resetHighlightMaterial(this.mapGeometry.children[0]["material"])
if (this.mapGeometry.children[0]) {
this.resetHighlightMaterial(this.mapGeometry.children[0]["material"])
}
this.highlighted = []
this.constantHighlight.clear()
}
Expand Down

0 comments on commit 9f0e096

Please sign in to comment.