Просмотр исходного кода

Merge pull request #15193 from overleaf/ae-show-file-tree

Ensure that file tree toggle shows the current status

GitOrigin-RevId: 960937b075780e9a0c3a8518660b15f14d96c6bc
Alf Eaton 3 лет назад
Родитель
Сommit
46fe0d6d0b
2 измененных файлов с 5 добавлено и 5 удалено
  1. 3 3
      services/web/frontend/js/ide/directives/layout.js
  2. 2 2
      services/web/locales/en.json

+ 3 - 3
services/web/frontend/js/ide/directives/layout.js

@@ -220,7 +220,7 @@ aria-label=\"{{ isOpen ? tooltipMsgWhenOpen : tooltipMsgWhenClosed }}\">\
         }
 
         function onPaneOpen(pane) {
-          if (!hasCustomToggler && pane !== customTogglerPane) {
+          if (!hasCustomToggler || pane !== customTogglerPane) {
             return
           }
           return customTogglerEl
@@ -229,7 +229,7 @@ aria-label=\"{{ isOpen ? tooltipMsgWhenOpen : tooltipMsgWhenClosed }}\">\
         }
 
         function onPaneClose(pane) {
-          if (!hasCustomToggler && pane !== customTogglerPane) {
+          if (!hasCustomToggler || pane !== customTogglerPane) {
             return
           }
           return customTogglerEl
@@ -263,7 +263,7 @@ aria-label=\"{{ isOpen ? tooltipMsgWhenOpen : tooltipMsgWhenClosed }}\">\
               } else {
                 layout.close('east')
               }
-              if (hasCustomToggler) {
+              if (hasCustomToggler && customTogglerPane === 'east') {
                 repositionCustomToggler()
                 customTogglerEl.scope().$applyAsync(function () {
                   customTogglerEl.scope().isOpen = value

+ 2 - 2
services/web/locales/en.json

@@ -1824,9 +1824,9 @@
   "toolbar_table_insert_table_lowercase": "Insert table",
   "toolbar_toggle_symbol_palette": "Toggle Symbol Palette",
   "toolbar_undo": "Undo",
-  "tooltip_hide_filetree": "Click to hide the file-tree",
+  "tooltip_hide_filetree": "Click to hide the file tree",
   "tooltip_hide_pdf": "Click to hide the PDF",
-  "tooltip_show_filetree": "Click to show the file-tree",
+  "tooltip_show_filetree": "Click to show the file tree",
   "tooltip_show_pdf": "Click to show the PDF",
   "top_pick": "Top pick",
   "total": "Total",