mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix synctex controls with new Ace
This commit is contained in:
parent
1ce5062800
commit
aaebb0902d
3 changed files with 9 additions and 3 deletions
|
@ -96,5 +96,6 @@ define [
|
|||
, 0
|
||||
|
||||
resetOpenStates()
|
||||
onInternalResize()
|
||||
}
|
||||
]
|
|
@ -91,7 +91,7 @@ define [
|
|||
editor.setValue(text, -1)
|
||||
session = editor.getSession()
|
||||
session.setUseWrapMode(true)
|
||||
session.setMode(new LatexMode())
|
||||
session.setMode("ace/mode/latex")
|
||||
|
||||
scope.$watch "annotations", (annotations) ->
|
||||
if annotations?
|
||||
|
|
|
@ -229,13 +229,18 @@ define [
|
|||
$scope.showControls = false
|
||||
else
|
||||
$scope.showControls = true
|
||||
|
||||
setTimeout () ->
|
||||
$scope.$digest()
|
||||
, 0
|
||||
|
||||
$scope.syncToPdf = () ->
|
||||
@cursorPosition = null
|
||||
ide.$scope.$on "cursor:editor:update", (event, @cursorPosition) =>
|
||||
|
||||
$scope.syncToPdf = () =>
|
||||
return if !@cursorPosition?
|
||||
synctex
|
||||
.syncToPdf($scope.editor.cursorPosition)
|
||||
.syncToPdf(@cursorPosition)
|
||||
.then (highlights) ->
|
||||
$scope.pdf.highlights = highlights
|
||||
|
||||
|
|
Loading…
Reference in a new issue