From 1d8febed9f0559e1a4716ed9afb1b7d12e197d7c Mon Sep 17 00:00:00 2001 From: Marco Heiming Date: Wed, 12 Jan 2022 16:57:42 +0100 Subject: [PATCH] Do not overwrite circle on event (e.g. charging) if there is a circle configured for that place --- apps/circlesclock/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index 822802afa..88a04d4b9 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -136,8 +136,10 @@ function getCirclePosition(type) { if (setting == type) return circlePosX[i - 1]; } for (let i = 0; i < defaultCircleTypes.length; i++) { - if (type == defaultCircleTypes[i]) return circlePosX[i]; - } + if (type == defaultCircleTypes[i] && (!settings || settings['circle' + (i + 1)] == undefined)) { + return circlePosX[i]; + } + } return undefined; }