fix(study): 캔버스 디버그 오버레이 제거 (좌표 표시 거슬림)
This commit is contained in:
@@ -79,9 +79,6 @@
|
||||
const WIDTH_FACTOR: Record<Width, number> = { thin: 0.6, normal: 1, thick: 1.6 };
|
||||
let effectiveSize = $derived(baseSize * WIDTH_FACTOR[widthMode]);
|
||||
|
||||
// 디버그: 캔버스 크기 + 마지막 pointer 정보. 좌표 어긋남 디버깅용.
|
||||
let lastDebug = $state<{x:number;y:number;p:number;t:string} | null>(null);
|
||||
|
||||
// 지우개 반경 (CSS px) — effectiveSize 의 약 4배. Apple Pencil 정밀도와 균형.
|
||||
let eraserRadius = $derived(Math.max(16, effectiveSize * 4));
|
||||
|
||||
@@ -246,7 +243,6 @@
|
||||
|
||||
activePointerId = e.pointerId;
|
||||
const [x, y] = getLocalXY(e);
|
||||
lastDebug = { x: Math.round(x), y: Math.round(y), p: e.pressure, t: e.pointerType };
|
||||
|
||||
if (tool === 'eraser') {
|
||||
const removed = eraseAt(x, y);
|
||||
@@ -269,7 +265,6 @@
|
||||
function onPointerMove(e: PointerEvent) {
|
||||
if (e.pointerId !== activePointerId) return;
|
||||
const [x, y] = getLocalXY(e);
|
||||
lastDebug = { x: Math.round(x), y: Math.round(y), p: e.pressure, t: e.pointerType };
|
||||
|
||||
if (tool === 'eraser') {
|
||||
const removed = eraseAt(x, y);
|
||||
@@ -512,12 +507,5 @@
|
||||
style="touch-action: none; cursor: {tool === 'eraser' ? 'cell' : 'crosshair'};"
|
||||
></canvas>
|
||||
|
||||
<!-- 디버그 오버레이 — 좌표 어긋남 디버깅 후 제거 예정 -->
|
||||
<div class="absolute top-1 right-1 px-2 py-1 rounded bg-bg/80 text-[10px] text-dim font-mono pointer-events-none">
|
||||
{cssWidth}×{cssHeight}
|
||||
{#if lastDebug}
|
||||
· {lastDebug.t} ({lastDebug.x},{lastDebug.y}) p={lastDebug.p.toFixed(2)}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user