feat: perimeter hitboxes now trigger dock (center stays button-only)

This commit is contained in:
Hermes Agent committed 2026-09-10 15:11:14 +02:00
1 parent 6624805449
commit 6393c276a0
1 file changed
+10 -10
+10 -10
View File
@@ -397,16 +397,16 @@ function Plugin () {
<path d="M10 1C10.5523 1 11 1.44772 11 2C11 2.55228 10.5523 3 10 3C9.44772 3 9 2.55228 9 2C9 1.44772 9.44772 1 10 1Z" fill="currentColor" /> <path d="M10 1C10.5523 1 11 1.44772 11 2C11 2.55228 10.5523 3 10 3C9.44772 3 9 2.55228 9 2C9 1.44772 9.44772 1 10 1Z" fill="currentColor" />
</svg> </svg>
</div> </div>
{/* Ручки ресайза по периметру (4 края + 4 угла) — ВИДИМЫЕ для отладки. {/* Ручки по периметру (4 края + 4 угла) — клик = док в эту позицию.
Каждая ловит pointerdown и шлёт dir в startResize. */} ВИДИМЫЕ для отладки (фиолетовые). Центр НЕ входит в периметр — только кнопкой. */}
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'top-left') }} style={{ position: 'fixed', top: -3, left: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'nwse-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('top-left') }} style={{ position: 'fixed', top: -3, left: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'top') }} style={{ position: 'fixed', top: -3, left: '50%', transform: 'translateX(-50%)', width: 32, height: 10, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'ns-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('top-center') }} style={{ position: 'fixed', top: -3, left: '50%', transform: 'translateX(-50%)', width: 32, height: 10, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'top-right') }} style={{ position: 'fixed', top: -3, right: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'nesw-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('top-right') }} style={{ position: 'fixed', top: -3, right: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'left') }} style={{ position: 'fixed', top: '50%', left: -3, transform: 'translateY(-50%)', width: 10, height: 32, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'ew-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('center-left') }} style={{ position: 'fixed', top: '50%', left: -3, transform: 'translateY(-50%)', width: 10, height: 32, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'right') }} style={{ position: 'fixed', top: '50%', right: -3, transform: 'translateY(-50%)', width: 10, height: 32, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'ew-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('center-right') }} style={{ position: 'fixed', top: '50%', right: -3, transform: 'translateY(-50%)', width: 10, height: 32, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'bottom-left') }} style={{ position: 'fixed', bottom: -3, left: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'nesw-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('bottom-left') }} style={{ position: 'fixed', bottom: -3, left: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'bottom') }} style={{ position: 'fixed', bottom: -3, left: '50%', transform: 'translateX(-50%)', width: 32, height: 10, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'ns-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('bottom-center') }} style={{ position: 'fixed', bottom: -3, left: '50%', transform: 'translateX(-50%)', width: 32, height: 10, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
<div onPointerDown={function (e: PointerEvent) { startResize(e, 'bottom-right') }} style={{ position: 'fixed', bottom: -3, right: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'nwse-resize' }} aria-hidden="true" /> <div onPointerDown={function (e: PointerEvent) { e.preventDefault(); e.stopPropagation(); dockWindow('bottom-right') }} style={{ position: 'fixed', bottom: -3, right: -3, width: 12, height: 12, zIndex: 3, background: 'rgba(211,168,255,0.6)', cursor: 'pointer' }} aria-hidden="true" />
</Fragment> </Fragment>
) )
} }