mirror of
https://github.com/beestat/app.git
synced 2025-06-04 22:27:27 -04:00
Fixed a few more minor bugs and improved usability
This commit is contained in:
parent
35d4d0b1f3
commit
ee6bd74295
@ -62,6 +62,7 @@ window.addEventListener('resize', rocket.throttle(100, function() {
|
|||||||
600,
|
600,
|
||||||
650,
|
650,
|
||||||
800,
|
800,
|
||||||
|
850,
|
||||||
1000
|
1000
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -616,6 +616,11 @@ beestat.component.card.three_d.prototype.decorate_legend_ = function(parent) {
|
|||||||
let units;
|
let units;
|
||||||
let min = this.get_heat_map_min_();
|
let min = this.get_heat_map_min_();
|
||||||
let max = this.get_heat_map_max_();
|
let max = this.get_heat_map_max_();
|
||||||
|
|
||||||
|
if (
|
||||||
|
min !== Infinity &&
|
||||||
|
max !== -Infinity
|
||||||
|
) {
|
||||||
if (beestat.setting('visualize.data_type') === 'temperature') {
|
if (beestat.setting('visualize.data_type') === 'temperature') {
|
||||||
min = beestat.temperature(min);
|
min = beestat.temperature(min);
|
||||||
max = beestat.temperature(max);
|
max = beestat.temperature(max);
|
||||||
@ -645,6 +650,7 @@ beestat.component.card.three_d.prototype.decorate_legend_ = function(parent) {
|
|||||||
});
|
});
|
||||||
max_container.innerText = max + units;
|
max_container.innerText = max + units;
|
||||||
gradient_container.appendChild(max_container);
|
gradient_container.appendChild(max_container);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +19,7 @@ beestat.component.card.visualize_intro.prototype.decorate_contents_ = function(p
|
|||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
const p1 = document.createElement('p');
|
const p1 = document.createElement('p');
|
||||||
p1.innerText = 'You now have early access to the new Visualize features. This is a work-in-progress, but you should find it to be mostly stable. More features and improvements are in the works, as well as documentation and videos to help explain the new capabilities.';
|
p1.innerText = 'You now have early access to the new Visualize features. This is a work-in-progress, but you should find it to be mostly stable. More features and improvements are in the works.';
|
||||||
parent.appendChild(p1);
|
parent.appendChild(p1);
|
||||||
|
|
||||||
const p2 = document.createElement('p');
|
const p2 = document.createElement('p');
|
||||||
|
@ -3,7 +3,11 @@
|
|||||||
*/
|
*/
|
||||||
beestat.component.card.visualize_settings = function() {
|
beestat.component.card.visualize_settings = function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
beestat.dispatcher.addEventListener('cache.floor_plan', function() {
|
beestat.dispatcher.addEventListener([
|
||||||
|
'cache.floor_plan',
|
||||||
|
'cache.data.three_d__runtime_sensor'
|
||||||
|
],
|
||||||
|
function() {
|
||||||
self.rerender();
|
self.rerender();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -45,6 +49,16 @@ beestat.component.card.visualize_settings.prototype.decorate_contents_ = functio
|
|||||||
const heat_map_type_container = document.createElement('div');
|
const heat_map_type_container = document.createElement('div');
|
||||||
this.decorate_heat_map_type_(heat_map_type_container);
|
this.decorate_heat_map_type_(heat_map_type_container);
|
||||||
grid_2.appendChild(heat_map_type_container);
|
grid_2.appendChild(heat_map_type_container);
|
||||||
|
|
||||||
|
// If at least one sensor is on the floor plan and the data is loading.
|
||||||
|
if (
|
||||||
|
beestat.cache.data.three_d__runtime_sensor === undefined &&
|
||||||
|
Object.keys(beestat.floor_plan.get_sensor_ids_map(
|
||||||
|
beestat.setting('visualize.floor_plan_id')
|
||||||
|
)).length > 0
|
||||||
|
) {
|
||||||
|
this.show_loading_('Fetching');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,6 +74,14 @@ beestat.component.floor_plan.prototype.render = function(parent) {
|
|||||||
});
|
});
|
||||||
parent.appendChild(this.toolbar_container_);
|
parent.appendChild(this.toolbar_container_);
|
||||||
|
|
||||||
|
this.toolbar_helper_container_ = $.createElement('div');
|
||||||
|
this.toolbar_helper_container_.style({
|
||||||
|
'position': 'absolute',
|
||||||
|
'top': 55,
|
||||||
|
'left': beestat.style.size.gutter * 4
|
||||||
|
});
|
||||||
|
parent.appendChild(this.toolbar_helper_container_);
|
||||||
|
|
||||||
this.floors_container_ = $.createElement('div');
|
this.floors_container_ = $.createElement('div');
|
||||||
this.floors_container_.style({
|
this.floors_container_.style({
|
||||||
'position': 'absolute',
|
'position': 'absolute',
|
||||||
@ -435,6 +443,17 @@ beestat.component.floor_plan.prototype.update_toolbar = function() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Helper
|
||||||
|
if (beestat.floor_plan.get_area(this.floor_plan_id_) === 0) {
|
||||||
|
new beestat.component.tile()
|
||||||
|
.set_text('Start by adding a room')
|
||||||
|
.set_shadow(false)
|
||||||
|
.set_background_color(beestat.style.color.green.base)
|
||||||
|
.set_text_color('#fff')
|
||||||
|
.set_type('pill')
|
||||||
|
.render(this.toolbar_helper_container_);
|
||||||
|
}
|
||||||
|
|
||||||
// Remove room
|
// Remove room
|
||||||
const remove_room_button = new beestat.component.tile()
|
const remove_room_button = new beestat.component.tile()
|
||||||
.set_icon('card_remove_outline')
|
.set_icon('card_remove_outline')
|
||||||
|
@ -38,11 +38,11 @@ beestat.component.header.prototype.decorate_ = function(parent) {
|
|||||||
'text': 'Analyze',
|
'text': 'Analyze',
|
||||||
'icon': 'home_search'
|
'icon': 'home_search'
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// 'layer': 'visualize',
|
'layer': 'visualize',
|
||||||
// 'text': 'Visualize',
|
'text': 'Visualize',
|
||||||
// 'icon': 'floor_plan'
|
'icon': 'floor_plan'
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
'layer': 'compare',
|
'layer': 'compare',
|
||||||
'text': 'Compare',
|
'text': 'Compare',
|
||||||
@ -127,7 +127,7 @@ beestat.component.header.prototype.decorate_ = function(parent) {
|
|||||||
.set_shadow(false)
|
.set_shadow(false)
|
||||||
.set_text_color(beestat.style.color.bluegray.dark);
|
.set_text_color(beestat.style.color.bluegray.dark);
|
||||||
|
|
||||||
if (beestat.width > 800) {
|
if (beestat.width > 850) {
|
||||||
button.set_text(page.text);
|
button.set_text(page.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,15 +229,6 @@ beestat.component.header.prototype.decorate_ = function(parent) {
|
|||||||
(new beestat.layer.settings()).render();
|
(new beestat.layer.settings()).render();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (beestat.user.has_early_access() === true) {
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
|
||||||
.set_text('Visualize (Early Access)')
|
|
||||||
.set_icon('floor_plan')
|
|
||||||
.set_callback(function() {
|
|
||||||
(new beestat.layer.visualize()).render();
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
menu.add_menu_item(new beestat.component.menu_item()
|
menu.add_menu_item(new beestat.component.menu_item()
|
||||||
.set_text('Log Out')
|
.set_text('Log Out')
|
||||||
.set_icon('exit_to_app')
|
.set_icon('exit_to_app')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user