|
|
@ -79,10 +79,9 @@ class EditorPanel { |
|
|
|
self._view.mainPanel.style.display = 'none' |
|
|
|
self._view.mainPanel.style.display = 'none' |
|
|
|
}) |
|
|
|
}) |
|
|
|
self.data = { |
|
|
|
self.data = { |
|
|
|
_FILE_SCROLL_DELTA: 200, |
|
|
|
|
|
|
|
_layout: { |
|
|
|
_layout: { |
|
|
|
top: { |
|
|
|
top: { |
|
|
|
offset: self._deps.config.get('terminal-top-offset') || 500, |
|
|
|
offset: self._deps.config.get('terminal-top-offset') || 150, |
|
|
|
show: true |
|
|
|
show: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -104,7 +103,7 @@ class EditorPanel { |
|
|
|
var height = window.innerHeight |
|
|
|
var height = window.innerHeight |
|
|
|
var newpos = (event.pageY < limitUp) ? limitUp : event.pageY |
|
|
|
var newpos = (event.pageY < limitUp) ? limitUp : event.pageY |
|
|
|
newpos = (newpos < height - limitDown) ? newpos : height - limitDown |
|
|
|
newpos = (newpos < height - limitDown) ? newpos : height - limitDown |
|
|
|
return newpos |
|
|
|
return height - newpos |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -138,11 +137,11 @@ class EditorPanel { |
|
|
|
var tmp = delta - limitDown |
|
|
|
var tmp = delta - limitDown |
|
|
|
delta = tmp > 0 ? tmp : 0 |
|
|
|
delta = tmp > 0 ? tmp : 0 |
|
|
|
if (direction === 'top') { |
|
|
|
if (direction === 'top') { |
|
|
|
var height = containerHeight - delta |
|
|
|
var mainPanelHeight = containerHeight - delta |
|
|
|
height = height < 0 ? 0 : height |
|
|
|
mainPanelHeight = mainPanelHeight < 0 ? 0 : mainPanelHeight |
|
|
|
self._view.editor.style.height = `${delta}px` |
|
|
|
self._view.editor.style.height = `${mainPanelHeight}px` |
|
|
|
self._view.mainPanel.style.height = `${delta}px` |
|
|
|
self._view.mainPanel.style.height = `${mainPanelHeight}px` |
|
|
|
self._view.terminal.style.height = `${height}px` // - menu bar height
|
|
|
|
self._view.terminal.style.height = `${delta}px` // - menu bar height
|
|
|
|
self._components.editor.resize((document.querySelector('#editorWrap') || {}).checked) |
|
|
|
self._components.editor.resize((document.querySelector('#editorWrap') || {}).checked) |
|
|
|
self._components.terminal.scroll2bottom() |
|
|
|
self._components.terminal.scroll2bottom() |
|
|
|
} |
|
|
|
} |
|
|
|