Skip to content

Commit 90f366a

Browse files
committed
fix size pinnedpanel
1 parent 1c4700a commit 90f366a

File tree

1 file changed

+4
-1
lines changed
  • libs/remix-ui/app/src/lib/remix-app/components/dragbar

1 file changed

+4
-1
lines changed

libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ const DragBar = (props: IRemixDragBarUi) => {
5151
setDragBarPosX(offset + width)
5252
}, 300)
5353
} else if (layoutPosition === 'right') {
54-
const width = coeff * window.innerWidth
54+
// Use a smaller coefficient for the right panel
55+
const rightCoeff = 0.25
56+
const width = rightCoeff * window.innerWidth
5557

5658
refObject.current.style.width = width + 'px'
5759
setTimeout(() => {
@@ -62,6 +64,7 @@ const DragBar = (props: IRemixDragBarUi) => {
6264
}
6365

6466
useEffect(() => {
67+
// Only use 0.4 for left, right will use its own value in triggerWidth
6568
triggerWidth(props.maximiseTrigger, props.layoutPosition, props.refObject, 0.4)
6669
}, [props.maximiseTrigger])
6770

0 commit comments

Comments
 (0)