[BUG] UI: Inactive click area on the Timeline

-Made the clickable area larger by increasing the container height
-Fixed lint errors.
This commit is contained in:
Vlad
2025-07-29 22:23:34 -04:00
parent deda0e366f
commit da0e768b32
4 changed files with 225 additions and 123 deletions
@@ -211,7 +211,7 @@ export function PreviewPanel() {
setDragState({
isDragging: true,
elementId: element.id,
trackId: trackId,
trackId,
startX: e.clientX,
startY: e.clientY,
initialElementX: element.x,
@@ -355,8 +355,24 @@ export function PreviewPanel() {
handleTextMouseDown(e, element, elementData.track.id)
}
style={{
left: `${50 + ((dragState.isDragging && dragState.elementId === element.id ? dragState.currentX : element.x) / canvasSize.width) * 100}%`,
top: `${50 + ((dragState.isDragging && dragState.elementId === element.id ? dragState.currentY : element.y) / canvasSize.height) * 100}%`,
left: `${
50 +
(
(dragState.isDragging && dragState.elementId === element.id
? dragState.currentX
: element.x) / canvasSize.width
) *
100
}%`,
top: `${
50 +
(
(dragState.isDragging && dragState.elementId === element.id
? dragState.currentY
: element.y) / canvasSize.height
) *
100
}%`,
transform: `translate(-50%, -50%) rotate(${element.rotation}deg) scale(${scaleRatio})`,
opacity: element.opacity,
zIndex: 100 + index, // Text elements on top