pull/5011/head
Your Name 4 months ago committed by Aniket
parent 07844a6821
commit 65747f93e1
  1. 12
      apps/remix-ide/src/app/panels/layout.ts
  2. 4
      libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx

@ -65,7 +65,6 @@ export class Layout extends Plugin {
this.event.emit('change', null)
})
this.on('tabs', 'openDiff', () => {
console.log('openDiff')
this.panels.editor.active = true
this.panels.main.active = false
this.event.emit('change', null)
@ -79,7 +78,6 @@ export class Layout extends Plugin {
})
this.on('sidePanel', 'focusChanged', async (name) => {
const current = await this.call('sidePanel', 'currentFocus')
console.log('focusChanged', current, this.maximised)
if (this.maximised[current]) {
this.event.emit('maximisesidepanel')
} else {
@ -127,16 +125,15 @@ export class Layout extends Plugin {
}
async maximiseSidePanel () {
this.event.emit('maximisesidepanel')
const current = await this.call('sidePanel', 'currentFocus')
this.maximised[current] = true
console.log('maximised', this.maximised, current)
this.event.emit('maximisesidepanel')
}
async maximisePinnedPanel () {
this.event.emit('maximisepinnedpanel')
const current = await this.call('pinnedPanel', 'currentFocus')
this.maximised[current] = true
this.event.emit('maximisepinnedpanel')
}
async maximizeTerminal() {
@ -146,15 +143,14 @@ export class Layout extends Plugin {
}
async resetSidePanel () {
this.event.emit('resetsidepanel')
const current = await this.call('sidePanel', 'currentFocus')
this.maximised[current] = false
console.log('reset max', this.maximised, current)
this.event.emit('resetsidepanel')
}
async resetPinnedPanel () {
this.event.emit('resetpinnedpanel')
const current = await this.call('pinnedPanel', 'currentFocus')
this.maximised[current] = false
this.event.emit('resetpinnedpanel')
}
}

@ -41,7 +41,6 @@ const DragBar = (props: IRemixDragBarUi) => {
}, [props.hidden, offset])
useEffect(() => {
initialWidth.current = props.refObject.current.clientWidth
if (props.maximiseTrigger > 0) {
if (props.layoutPosition === 'left') {
const width = 0.4 * window.innerWidth
@ -106,6 +105,7 @@ const DragBar = (props: IRemixDragBarUi) => {
setTimeout(() => {
props.setHideStatus(false)
setDragBarPosX(offset + props.refObject.current.offsetWidth)
initialWidth.current = props.refObject.current.clientWidth
}, 300)
}
} else if (props.layoutPosition === 'right') {
@ -117,9 +117,11 @@ const DragBar = (props: IRemixDragBarUi) => {
setTimeout(() => {
props.setHideStatus(false)
setDragBarPosX(props.refObject.current.offsetLeft)
initialWidth.current = props.refObject.current.clientWidth
}, 300)
}
}
}
function startDrag() {

Loading…
Cancel
Save