feat: revamp sensor add flow

This commit is contained in:
2026-05-16 12:00:55 +02:00
parent be6ac42059
commit f37176cce5
12 changed files with 478 additions and 186 deletions
+3 -1
View File
@@ -377,6 +377,7 @@ function renderSensors() {
if (!existing.isDragging()) existing.position({ x: absX, y: absY });
existing.draggable(mode === 'sensorMove');
existing.findOne('Text')?.text(label);
existing.findOne('.sensor-dot')?.fill(sensor.confirmed ? '#1565C0' : '#9E9E9E');
return;
}
@@ -394,8 +395,9 @@ function _buildSensorGroup(sensor, absX, absY, label) {
// Visible dot — hitFunc expands the touch target without changing appearance.
group.add(new Konva.Circle({
name: 'sensor-dot',
radius: 8,
fill: '#1565C0',
fill: sensor.confirmed ? '#1565C0' : '#9E9E9E',
stroke: '#ffffff',
strokeWidth: 2,
hitFunc(ctx, shape) {