mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 08:21:13 +00:00
Don't reload editor with file tree or PDF viewer hidden
This commit is contained in:
parent
fde7efbb9f
commit
ff7632d6c7
3 changed files with 14 additions and 3 deletions
|
@ -53,7 +53,13 @@ block content
|
|||
|
||||
include ./editor/share
|
||||
|
||||
#ide-body(ng-cloak, layout="main", ng-hide="state.loading", resize-on="layout:chat:resize")
|
||||
#ide-body(
|
||||
ng-cloak,
|
||||
layout="main",
|
||||
ng-hide="state.loading",
|
||||
resize-on="layout:chat:resize",
|
||||
minimum-restore-size-west="130"
|
||||
)
|
||||
.ui-layout-west
|
||||
include ./editor/file-tree
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ div.full-size(
|
|||
resize-on="layout:main:resize"
|
||||
resize-proportionally="true"
|
||||
initial-size-east="'50%'"
|
||||
minimum-restore-size-east="300"
|
||||
)
|
||||
.ui-layout-center
|
||||
.loading-panel(ng-show="!editor.sharejs_doc || editor.opening")
|
||||
|
|
|
@ -37,8 +37,12 @@ define [
|
|||
|
||||
# Restore previously recorded state
|
||||
if (state = ide.localStorage("layout.#{name}"))?
|
||||
options.west = state.west
|
||||
options.east = state.east
|
||||
if state.east?
|
||||
if !attrs.minimumRestoreSizeEast? or (state.east.size >= attrs.minimumRestoreSizeEast and !state.east.initClosed)
|
||||
options.east = state.east
|
||||
if state.west?
|
||||
if !attrs.minimumRestoreSizeWest? or (state.west.size >= attrs.minimumRestoreSizeWest and !state.west.initClosed)
|
||||
options.west = state.west
|
||||
|
||||
repositionControls = () ->
|
||||
state = element.layout().readState()
|
||||
|
|
Loading…
Reference in a new issue