From 8d7397699c4f57a5a2d34ff13e80eddcbd0b8ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastjan=20Arti=C4=8D?= Date: Thu, 30 Apr 2026 11:27:19 +0000 Subject: [PATCH] Trim handles: set initial inline left positions JS renderTrim() likely failed silently (Cannot read undefined of length). Set handle positions inline in HTML template so they show immediately without waiting for renderTrim() to fire. Added pctOfStr helper to compute percentage as string for inline style. --- templates/index.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3d8dfe0..03a7dad 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1014,6 +1014,12 @@ let videoDuration = data.video_duration || endInit + 60; const segments = data.segments || []; + // Helper za inline styles (procent v stringu) + function pctOfStr(t, total) { + if (!total || total <= 0) return "0"; + return ((t / total) * 100).toFixed(2); + } + const overlay = document.createElement("div"); overlay.className = "modal-overlay"; overlay.innerHTML = ` @@ -1026,20 +1032,20 @@
-
+
-
+
-
+
-
+
0:00