mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Don't reload editor with file tree or PDF viewer hidden
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user