Keep empty region previews blank
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m14s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 32s

This commit is contained in:
lzstealth committed 2026-09-14 00:22:39 +01:00
1 parent 1e317997c4
commit a4936b6a20
13 files changed
+22 -15

No files matched your search

+2 -1
View File
@@ -69,6 +69,8 @@ function substituteWeatherVariables(html, value) {
}
function renderWeatherRegion(region, regionContent) {
var value = String(regionContent && regionContent.value || '');
if (!value.trim()) return '';
var location = getWeatherLocation(regionContent && regionContent.weather_location_id);
var snapshot = location && location.responseJson && typeof location.responseJson === 'object' ? location.responseJson : null;
var width = Math.max(1, Math.round(Number(region && region.pixelWidth) || 1));
@@ -77,7 +79,6 @@ function renderWeatherRegion(region, regionContent) {
var style = 'width:' + width + 'px;height:' + height + 'px;transform:scale(' + scale + ');transform-origin:top left;overflow:hidden;';
if (!location || !snapshot) return '<div class="template-region weather" style="' + region.baseStyle + '"><div style="' + style + '"></div></div>';
var current = snapshot.current || {};
var value = String(regionContent && regionContent.value || '');
if (value) {
var weatherData = withWeatherUnits(snapshot, location);
var fontSize = Math.max(8, Number(regionContent && regionContent.font_size || region && (region.font_size || region.fontSize) || 32) || 32);