Przeglądaj źródła

Merge remote-tracking branch 'origin/master' into afc-multiple-managers

Alberto Fernández Capel 8 lat temu
rodzic
commit
a72dec4b6e

+ 4 - 1
services/web/app/views/project/editor/editor.pug

@@ -26,7 +26,10 @@ div.full-size(
 			'rp-loading-threads': reviewPanel.loadingThreads,\
 			'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")
 			span(ng-show="editor.open_doc_id")
 				i.fa.fa-spin.fa-refresh
 				i.fa.fa-spin.fa-refresh
 				|   #{translate("loading")}...
 				|   #{translate("loading")}...

+ 3 - 0
services/web/public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee

@@ -37,6 +37,9 @@ define [], () ->
 		onCursorChange: () =>
 		onCursorChange: () =>
 			@emitCursorUpdateEvent()
 			@emitCursorUpdateEvent()
 
 
+		onSyncToPdf: () =>
+			@$scope.$emit "cursor:#{@$scope.name}:syncToPdf"
+
 		storeFirstVisibleLine: () ->
 		storeFirstVisibleLine: () ->
 			if @doc_id?
 			if @doc_id?
 				docPosition = @localStorage("doc.position.#{@doc_id}") || {}
 				docPosition = @localStorage("doc.position.#{@doc_id}") || {}

+ 2 - 0
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -718,6 +718,8 @@ define [
 				.then (highlights) ->
 				.then (highlights) ->
 					$scope.pdf.highlights = highlights
 					$scope.pdf.highlights = highlights
 
 
+		ide.$scope.$on "cursor:editor:syncToPdf", $scope.syncToPdf
+
 		$scope.syncToCode = () ->
 		$scope.syncToCode = () ->
 			synctex
 			synctex
 				.syncToCode($scope.pdf.position, includeVisualOffset: true, fromPdfPosition: true)
 				.syncToCode($scope.pdf.position, includeVisualOffset: true, fromPdfPosition: true)