mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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
|
, 0
|
||||||
|
|
||||||
resetOpenStates()
|
resetOpenStates()
|
||||||
|
onInternalResize()
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -91,7 +91,7 @@ define [
|
||||||
editor.setValue(text, -1)
|
editor.setValue(text, -1)
|
||||||
session = editor.getSession()
|
session = editor.getSession()
|
||||||
session.setUseWrapMode(true)
|
session.setUseWrapMode(true)
|
||||||
session.setMode(new LatexMode())
|
session.setMode("ace/mode/latex")
|
||||||
|
|
||||||
scope.$watch "annotations", (annotations) ->
|
scope.$watch "annotations", (annotations) ->
|
||||||
if annotations?
|
if annotations?
|
||||||
|
|
|
@ -229,13 +229,18 @@ define [
|
||||||
$scope.showControls = false
|
$scope.showControls = false
|
||||||
else
|
else
|
||||||
$scope.showControls = true
|
$scope.showControls = true
|
||||||
|
|
||||||
setTimeout () ->
|
setTimeout () ->
|
||||||
$scope.$digest()
|
$scope.$digest()
|
||||||
, 0
|
, 0
|
||||||
|
|
||||||
$scope.syncToPdf = () ->
|
@cursorPosition = null
|
||||||
|
ide.$scope.$on "cursor:editor:update", (event, @cursorPosition) =>
|
||||||
|
|
||||||
|
$scope.syncToPdf = () =>
|
||||||
|
return if !@cursorPosition?
|
||||||
synctex
|
synctex
|
||||||
.syncToPdf($scope.editor.cursorPosition)
|
.syncToPdf(@cursorPosition)
|
||||||
.then (highlights) ->
|
.then (highlights) ->
|
||||||
$scope.pdf.highlights = highlights
|
$scope.pdf.highlights = highlights
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue