From 6cf31c7062a609e4a36268865d9ab1d8984cea35 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Tue, 2 Jun 2026 09:55:38 +0800 Subject: [PATCH] Center camera text and bind text with state --- examples/webpage/app.js | 7 ------- examples/webpage/styles.css | 4 ++++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/webpage/app.js b/examples/webpage/app.js index 2e64506..141d61c 100644 --- a/examples/webpage/app.js +++ b/examples/webpage/app.js @@ -263,12 +263,6 @@ function syncCameraDrawer(value) { setCameraButtonEnabled(); } -function updateCameraQuestion(text) { - const value = typeof text === "string" ? text.trim() : ""; - if (!state.cameraState || !value) return; - els.cameraQuestion.textContent = value; -} - function addBubble(role, text) { if (els.chatLog.querySelector(".chat__empty")) { els.chatLog.innerHTML = ""; @@ -1139,7 +1133,6 @@ function handleAssistantFinal(text, interrupted) { if (interrupted) { state.currentAssistantBubble.classList.add("bubble--interrupted"); } - updateCameraQuestion(text); state.currentAssistantBubble = null; scrollChatToBottom(); } diff --git a/examples/webpage/styles.css b/examples/webpage/styles.css index 4e5059e..36becf5 100644 --- a/examples/webpage/styles.css +++ b/examples/webpage/styles.css @@ -277,6 +277,10 @@ body { .camera-drawer__source { flex: 1 1 auto; + display: inline-flex; + align-items: center; + justify-content: center; + text-align: center; min-height: 38px; font-size: 13px; font-weight: 600;