mirror of
https://github.com/beestat/app.git
synced 2026-04-23 17:49:38 -04:00
Tweaked visualize page to make it easier to record videos
This commit is contained in:
parent
e4a178ab41
commit
e2168f4adc
@ -331,6 +331,7 @@ beestat.component.card.floor_plan_editor.prototype.decorate_contents_ = function
|
||||
*/
|
||||
beestat.component.card.floor_plan_editor.prototype.decorate_drawing_pane_ = function(parent) {
|
||||
const self = this;
|
||||
const drawing_height = 575;
|
||||
|
||||
// Tear down prior drawing-pane components to avoid stale listeners.
|
||||
// Dispose existing SVG to remove any global listeners.
|
||||
@ -354,7 +355,7 @@ beestat.component.card.floor_plan_editor.prototype.decorate_drawing_pane_ = func
|
||||
'position': 'relative',
|
||||
'width': '100%',
|
||||
'overflow': 'hidden',
|
||||
'height': '500px'
|
||||
'height': drawing_height + 'px'
|
||||
});
|
||||
parent.appendChild(drawing_canvas_container);
|
||||
|
||||
@ -389,6 +390,11 @@ beestat.component.card.floor_plan_editor.prototype.decorate_drawing_pane_ = func
|
||||
);
|
||||
|
||||
this.floor_plan_.render(drawing_canvas_container);
|
||||
if (this.floor_plan_.height_ !== undefined && this.floor_plan_.height_ > 0) {
|
||||
this.floor_plan_.height_ = drawing_height;
|
||||
this.floor_plan_.svg_.setAttribute('height', drawing_height);
|
||||
this.floor_plan_.update_view_box_();
|
||||
}
|
||||
|
||||
this.layers_sidebar_ = new beestat.component.floor_plan_layers_sidebar(
|
||||
beestat.setting('visualize.floor_plan_id'),
|
||||
|
||||
@ -96,7 +96,7 @@ beestat.extend(beestat.component.card.three_d, beestat.component.card);
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
beestat.component.card.three_d.rerender_delay_floor_plan_ms = 5000;
|
||||
beestat.component.card.three_d.rerender_delay_floor_plan_ms = 2147483647;
|
||||
|
||||
/**
|
||||
* Debounce delay in milliseconds for scene setting-triggered rerenders.
|
||||
@ -423,6 +423,7 @@ beestat.component.card.three_d.prototype.decorate_contents_ = function(parent) {
|
||||
*/
|
||||
beestat.component.card.three_d.prototype.decorate_drawing_pane_ = function(parent) {
|
||||
const self = this;
|
||||
const drawing_height = 770;
|
||||
|
||||
// Create the scene
|
||||
if (this.scene_ !== undefined) {
|
||||
@ -456,6 +457,8 @@ beestat.component.card.three_d.prototype.decorate_drawing_pane_ = function(paren
|
||||
// Set the initial date.
|
||||
this.update_scene_();
|
||||
this.scene_.render($(parent));
|
||||
this.scene_.height_ = drawing_height;
|
||||
this.scene_.set_width(this.scene_.width_);
|
||||
|
||||
// Use current local time of day for initial scene lighting.
|
||||
const now = moment();
|
||||
|
||||
@ -18,89 +18,34 @@ beestat.layer.visualize.prototype.decorate_ = function(parent) {
|
||||
});
|
||||
|
||||
beestat.dispatcher.addEventListener([
|
||||
'setting.visualize.floor_plan_id',
|
||||
'setting.visualize.hide_affiliate'
|
||||
'setting.visualize.floor_plan_id'
|
||||
], function() {
|
||||
(new beestat.layer.visualize()).render();
|
||||
});
|
||||
|
||||
(new beestat.component.header('visualize')).render(parent);
|
||||
|
||||
// All the cards
|
||||
var cards = [];
|
||||
|
||||
if (window.is_demo === true) {
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.demo(),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
if (
|
||||
beestat.setting('visualize.floor_plan_id') !== null &&
|
||||
beestat.setting('visualize.floor_plan_id') !== undefined
|
||||
) {
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.floor_plan_editor(
|
||||
beestat.setting('thermostat_id')
|
||||
),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
|
||||
cards.push([
|
||||
var cards = [
|
||||
[
|
||||
{
|
||||
'card': new beestat.component.card.visualize_settings(),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
|
||||
if (
|
||||
beestat.setting('visualize.hide_affiliate') === false &&
|
||||
window.is_demo === false
|
||||
) {
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.visualize_affiliate(),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
cards.push([
|
||||
],
|
||||
[
|
||||
{
|
||||
'card': new beestat.component.card.floor_plan_editor(
|
||||
beestat.setting('thermostat_id')
|
||||
),
|
||||
'size': 6
|
||||
},
|
||||
{
|
||||
'card': new beestat.component.card.three_d()
|
||||
.set_floor_plan_id(beestat.setting('visualize.floor_plan_id')),
|
||||
'size': 12
|
||||
'size': 6
|
||||
}
|
||||
]);
|
||||
} else {
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.visualize_intro(
|
||||
beestat.setting('thermostat_id')
|
||||
),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.visualize_video(),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
// Footer
|
||||
cards.push([
|
||||
{
|
||||
'card': new beestat.component.card.footer(),
|
||||
'size': 12
|
||||
}
|
||||
]);
|
||||
]
|
||||
];
|
||||
|
||||
(new beestat.component.layout(cards)).render(parent);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user