Fix grab bug

This commit is contained in:
marzban-dev
2025-03-09 01:03:55 +03:30
parent c75f2bd7e9
commit c97cab5a50
+1 -1
View File
@@ -37,7 +37,7 @@ watch(
(newValue) => {
const clientRect = previewContainerEl.value?.getBoundingClientRect()!;
const percent = clientRect.width / 100;
const clipPercent = (newValue - clientRect.x - 8) / percent;
const clipPercent = ((newValue + draggableEl.value!.clientWidth / 2) - clientRect.x - 8) / percent;
if (clipPercent >= 5 && clipPercent <= 95) {
clipPathPercent.value = clipPercent;
}