+ {sorted.map((kf, i) => {
+ if (i === 0) return null;
+ const prev = sorted[i - 1]!;
+ const x1 = (prev.percentage / 100) * clipWidthPx;
+ const x2 = (kf.percentage / 100) * clipWidthPx;
+ return (
+
+ );
+ })}
+
+ {sorted.map((kf) => {
+ const leftPx = (kf.percentage / 100) * clipWidthPx - half;
+ const kfKey = `${elementId}:${kf.percentage}`;
+ const isKfSelected = selectedKeyframes.has(kfKey);
+ const atPlayhead = isSelected && Math.abs(kf.percentage - currentPercentage) < 0.05;
+ const color = isKfSelected || atPlayhead ? accentColor : "#a3a3a3";
+ return (
+
+ );
+ })}
+
+ );
+});