Skip to content

Commit

Permalink
fix(SplitPanel): react only to main button
Browse files Browse the repository at this point in the history
  • Loading branch information
jstarpl committed Dec 5, 2023
1 parent e7965f4 commit 56082d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.SegmentLineList {
display: grid;
grid-template-columns: 1fr 4em 6em 2fr 5fr 1fr 1fr;
grid-template-columns: 1fr 3em 4em 2fr 5fr 1fr 1fr;
padding: 0;
margin: 0;
--table-gap-size: 1px;
--table-gap-size: 2px;
gap: var(--table-gap-size);
}

Expand Down Expand Up @@ -41,6 +41,8 @@

.LineItem {
background: var(--color-dark-2);
overflow: hidden;
text-overflow: ellipsis;
}

.LineIdentifier {
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/client/src/components/SplitPanel/SplitPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function SplitPanel({
const defaultedPosition = position ?? 0.5

function onMouseDown(e: React.MouseEvent) {
if (e.button !== 0) return
setIsResizing(true)
beginCoords.current = { x: e.clientX, y: e.clientY }
contRect.current = container.current?.getBoundingClientRect() ?? null
Expand Down Expand Up @@ -57,6 +58,7 @@ export function SplitPanel({
}

function onMouseUp(e: MouseEvent) {
if (e.button !== 0) return
setIsResizing(false)
}

Expand Down

0 comments on commit 56082d3

Please sign in to comment.