1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Fixed sunrise/sunset indicator not appearing after editing address on floor plan

This commit is contained in:
Jon Ziebell 2022-08-26 13:50:47 -04:00
parent ad803838bf
commit 36fd1b9586
2 changed files with 14 additions and 3 deletions

View File

@ -11,6 +11,7 @@
"Highcharts": true,
"Sentry": true,
"THREE": true,
"SunCalc": true,
"ClipperLib": true
},
"extends": "eslint:all",

View File

@ -23,6 +23,7 @@ beestat.component.card.three_d = function() {
beestat.dispatcher.addEventListener('cache.floor_plan', function() {
self.scene_.rerender();
self.update_scene_();
self.update_hud_();
});
beestat.dispatcher.addEventListener('cache.data.three_d__runtime_sensor', function() {
@ -341,6 +342,12 @@ beestat.component.card.three_d.prototype.decorate_drawing_pane_ = function(paren
beestat.component.card.three_d.prototype.decorate_controls_ = function(parent) {
const self = this;
if (parent !== undefined) {
this.controls_container_ = parent;
}
this.controls_container_.innerHTML = '';
window.clearInterval(self.interval_);
// Hoisting
@ -352,7 +359,7 @@ beestat.component.card.three_d.prototype.decorate_controls_ = function(parent) {
'display': 'flex',
'align-items': 'center'
});
parent.appendChild(container);
this.controls_container_.appendChild(container);
const left_container = document.createElement('div');
container.appendChild(left_container);
@ -446,7 +453,7 @@ beestat.component.card.three_d.prototype.decorate_controls_ = function(parent) {
'margin-top': '-8px',
'text-align': 'right'
});
parent.appendChild(time_container);
this.controls_container_.appendChild(time_container);
range.addEventListener('input', function() {
play_tile.set_icon('play');
@ -741,14 +748,17 @@ beestat.component.card.three_d.prototype.has_data_ = function() {
*/
beestat.component.card.three_d.prototype.update_scene_ = function() {
this.scene_.set_data_type(beestat.setting('visualize.data_type'));
this.scene_.set_gradient(this.get_gradient_());
this.scene_.set_heat_map_min(this.get_heat_map_min_());
this.scene_.set_heat_map_max(this.get_heat_map_max_());
};
/**
* Update the HUD.
*/
beestat.component.card.three_d.prototype.update_hud_ = function() {
this.decorate_legend_();
this.decorate_controls_();
};
/**