diff --git a/services/web/app/views/project/editor/editor.pug b/services/web/app/views/project/editor/editor.pug index 28eafab60e..63f3e78c5b 100644 --- a/services/web/app/views/project/editor/editor.pug +++ b/services/web/app/views/project/editor/editor.pug @@ -26,7 +26,10 @@ div.full-size( 'rp-loading-threads': reviewPanel.loadingThreads,\ }" ) - .loading-panel(ng-show="!editor.sharejs_doc || editor.opening") + .loading-panel( + ng-show="!editor.sharejs_doc || editor.opening", + style=showRichText ? "top: 32px" : "", + ) span(ng-show="editor.open_doc_id") i.fa.fa-spin.fa-refresh |   #{translate("loading")}... diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee index 2cf025f70e..bb957f8cf6 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee @@ -37,6 +37,9 @@ define [], () -> onCursorChange: () => @emitCursorUpdateEvent() + onSyncToPdf: () => + @$scope.$emit "cursor:#{@$scope.name}:syncToPdf" + storeFirstVisibleLine: () -> if @doc_id? docPosition = @localStorage("doc.position.#{@doc_id}") || {} diff --git a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee index 77a94a564b..a9e95ac6ec 100644 --- a/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee +++ b/services/web/public/coffee/ide/pdf/controllers/PdfController.coffee @@ -718,6 +718,8 @@ define [ .then (highlights) -> $scope.pdf.highlights = highlights + ide.$scope.$on "cursor:editor:syncToPdf", $scope.syncToPdf + $scope.syncToCode = () -> synctex .syncToCode($scope.pdf.position, includeVisualOffset: true, fromPdfPosition: true)