mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 18:22:01 +00:00
Add key shortcut to toggle the review panel.
This commit is contained in:
parent
7c26628ce0
commit
832764dd3d
2 changed files with 11 additions and 0 deletions
|
@ -50,6 +50,7 @@ div.full-size(
|
|||
read-only="!permissions.write",
|
||||
file-name="editor.open_doc_name",
|
||||
on-ctrl-enter="recompileViaKey",
|
||||
on-ctrl-j="toggleReviewPanel",
|
||||
syntax-validation="settings.syntaxValidation",
|
||||
review-panel="reviewPanel",
|
||||
events-bridge="reviewPanelEventsBridge"
|
||||
|
|
|
@ -51,6 +51,7 @@ define [
|
|||
navigateHighlights: "="
|
||||
fileName: "="
|
||||
onCtrlEnter: "="
|
||||
onCtrlJ: "="
|
||||
syntaxValidation: "="
|
||||
reviewPanel: "="
|
||||
eventsBridge: "="
|
||||
|
@ -162,6 +163,15 @@ define [
|
|||
callback()
|
||||
readOnly: true
|
||||
|
||||
scope.$watch "onCtrlJ", (callback) ->
|
||||
if callback?
|
||||
editor.commands.addCommand
|
||||
name: "toggle-review-panel",
|
||||
bindKey: win: "Ctrl-J", mac: "Command-J"
|
||||
exec: (editor) =>
|
||||
callback()
|
||||
readOnly: true
|
||||
|
||||
# Make '/' work for search in vim mode.
|
||||
editor.showCommandLine = (arg) =>
|
||||
if arg == "/"
|
||||
|
|
Loading…
Reference in a new issue