fix maximize panel

pull/5193/head
yann300 5 months ago committed by Aniket
parent d7a45c76f8
commit 3c2e91983a
  1. 16
      apps/remix-ide/src/app/panels/layout.ts
  2. 20
      libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx

@ -85,7 +85,13 @@ export class Layout extends Plugin {
const current = await this.call('sidePanel', 'currentFocus')
if (this.enhanced[current]) {
this.event.emit('enhancesidepanel')
} else {
}
if (this.maximized[current]) {
this.event.emit('maximisesidepanel')
}
if (!this.enhanced[current] && !this.maximized[current]) {
this.event.emit('resetsidepanel')
}
})
@ -94,7 +100,13 @@ export class Layout extends Plugin {
const current = await this.call('pinnedPanel', 'currentFocus')
if (this.enhanced[current]) {
this.event.emit('enhancepinnedpanel')
} else {
}
if (this.maximized[current]) {
this.event.emit('maximisepinnedpanel')
}
if (!this.enhanced[current] && !this.maximized[current]) {
this.event.emit('resetpinnedpanel')
}
})

@ -46,21 +46,17 @@ const DragBar = (props: IRemixDragBarUi) => {
if (layoutPosition === 'left') {
const width = coeff * window.innerWidth
if (width > refObject.current.offsetWidth) {
props.refObject.current.style.width = width + 'px'
setTimeout(() => {
setDragBarPosX(offset + width)
}, 300)
}
props.refObject.current.style.width = width + 'px'
setTimeout(() => {
setDragBarPosX(offset + width)
}, 300)
} else if (layoutPosition === 'right') {
const width = coeff * window.innerWidth
if (width > refObject.current.offsetWidth) {
refObject.current.style.width = width + 'px'
setTimeout(() => {
setDragBarPosX(window.innerWidth - width)
}, 300)
}
refObject.current.style.width = width + 'px'
setTimeout(() => {
setDragBarPosX(window.innerWidth - width)
}, 300)
}
}
}

Loading…
Cancel
Save