From ade10e0aaff9d0546a1ab36d9eb3fa02e711abbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D0=B8=D0=BC=D0=BE=D0=B2=20=D0=A0=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BC?= Date: Sun, 11 Jan 2026 22:38:12 +0300 Subject: [PATCH] 1 --- src/components/LayoutStep.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/LayoutStep.tsx b/src/components/LayoutStep.tsx index bde04f1..40e739c 100644 --- a/src/components/LayoutStep.tsx +++ b/src/components/LayoutStep.tsx @@ -298,6 +298,16 @@ export const LayoutStep: React.FC = ({ config, splits, onChange }) => { } }; + // --- ДОБАВЛЕНО: Очистка при выходе мыши --- + const handleMouseLeave = () => { + setDragging(null); + setPhantomMainAxis(null); + setHoveredMainSplit(null); + setHoveredCell(null); + setHoveredPartition(null); + setPhantomPartition(null); + }; + // --- RENDER --- const renderCellsAndPartitions = () => { const elements = []; @@ -430,7 +440,12 @@ export const LayoutStep: React.FC = ({ config, splits, onChange }) => {
1 ? 'auto' : '100%', height: aspectRatio > 1 ? '100%' : 'auto', aspectRatio: `${1/aspectRatio}`, maxHeight: '100%', maxWidth: '100%', cursor: mode === 'lines' ? (dragging ? 'grabbing' : hoveredMainSplit ? 'col-resize' : 'crosshair') : (dragging ? 'grabbing' : hoveredPartition ? 'grab' : hoveredCell ? 'crosshair' : 'default') }}> - setDragging(null)} onMouseLeave={() => setDragging(null)} onContextMenu={(e) => e.preventDefault()}> + setDragging(null)} + onMouseLeave={handleMouseLeave} // ДОБАВЛЕН ОБРАБОТЧИК + onContextMenu={(e) => e.preventDefault()}> {renderCellsAndPartitions()}