Просмотр исходного кода

Show the pdf if it was already loaded.

This ensures the pdf will be visible if the user switches to fullscreen-view.
Shane Kilkelly 10 лет назад
Родитель
Сommit
d5c280dc4d
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

+ 3 - 1
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -6,7 +6,9 @@ define [
 	App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, localStorage) ->
 	App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, localStorage) ->
 
 
 		autoCompile = true
 		autoCompile = true
-		$scope.pdf.view = 'uncompiled'  # uncompiled | pdf | errors
+
+		# pdf.view = uncompiled | pdf | errors
+		$scope.pdf.view = if $scope?.pdf?.url then 'pdf' else 'uncompiled'
 		$scope.shouldShowLogs = false
 		$scope.shouldShowLogs = false
 
 
 		$scope.$on "project:joined", () ->
 		$scope.$on "project:joined", () ->