diff --git a/backend/pfm-web-app/src/app/manual-label/page.tsx b/backend/pfm-web-app/src/app/manual-label/page.tsx index c482390..2a69806 100644 --- a/backend/pfm-web-app/src/app/manual-label/page.tsx +++ b/backend/pfm-web-app/src/app/manual-label/page.tsx @@ -38,12 +38,6 @@ export default function ManualLabelPage() { items: [{ kodeBarang: "", namaBarang: "", banyak: "", jumlah: "" }] }); - // Transform states - const [scale, setScale] = useState(1.0); - const [rotation, setRotation] = useState(0); - const [isDragging, setIsDragging] = useState(false); - const dragStart = useRef({ x: 0, y: 0, scrollLeft: 0, scrollTop: 0 }); - const viewportRef = useRef(null); // Status indicators const [toast, setToast] = useState<{ message: string; show: boolean; isError: boolean }>({ @@ -109,9 +103,6 @@ export default function ManualLabelPage() { } }; - // Reset view - setScale(1.0); - setRotation(0); fetchLabel(); }, [currentIndex, files]); @@ -217,39 +208,6 @@ export default function ManualLabelPage() { } }; - // Panning functionality - const handleMouseDown = (e: React.MouseEvent) => { - if (e.target instanceof HTMLImageElement || e.target === viewportRef.current) { - setIsDragging(true); - const vp = viewportRef.current; - if (vp) { - dragStart.current = { - x: e.pageX - vp.offsetLeft, - y: e.pageY - vp.offsetTop, - scrollLeft: vp.scrollLeft, - scrollTop: vp.scrollTop - }; - } - } - }; - - const handleMouseMove = (e: React.MouseEvent) => { - if (!isDragging) return; - e.preventDefault(); - const vp = viewportRef.current; - if (vp) { - const x = e.pageX - vp.offsetLeft; - const y = e.pageY - vp.offsetTop; - const walkX = (x - dragStart.current.x) * 1.5; - const walkY = (y - dragStart.current.y) * 1.5; - vp.scrollLeft = dragStart.current.scrollLeft - walkX; - vp.scrollTop = dragStart.current.scrollTop - walkY; - } - }; - - const handleMouseUpOrLeave = () => { - setIsDragging(false); - }; return (
@@ -317,11 +275,11 @@ export default function ManualLabelPage() {
- {/* Main Split Layout */} -
+ {/* Centered Form Layout */} +
- {/* Left Form Viewport */} -
+ {/* Form Viewport */} +
{/* Metadata Card */}
@@ -518,70 +476,6 @@ export default function ManualLabelPage() {
- {/* Right Image Panning Viewport */} -
-
- {files[currentIndex] ? ( - {files[currentIndex]} - ) : ( -
Select an image to load
- )} -
- - {/* Interactive controls */} -
- - - - -
- -
-
{/* Alert toast notifications */}