mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 13:23:29 +00:00
Replace separate autocompile ctrl with listener in PdfController
This commit is contained in:
parent
53bb4fdde0
commit
9f1adfd0c0
4 changed files with 6 additions and 12 deletions
|
@ -1,5 +1,4 @@
|
|||
div.full-size.pdf(ng-controller="PdfController")
|
||||
.FIXME(ng-controller="AutoCompileController")
|
||||
.toolbar.toolbar-tall
|
||||
.btn-group(
|
||||
dropdown,
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
define [
|
||||
"ide/pdf/controllers/PdfController"
|
||||
"ide/pdf/controllers/PdfViewToggleController"
|
||||
"ide/pdfng/directives/pdfJs",
|
||||
"ide/pdf/controllers/AutoCompileController"
|
||||
"ide/pdfng/directives/pdfJs"
|
||||
], () ->
|
||||
class PdfManager
|
||||
constructor: (@ide, @$scope) ->
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
App.controller "AutoCompileController", ["$scope", "ide", ($scope, ide) ->
|
||||
ide.$scope.$on "ide:opAcknowledged", _.debounce(() ->
|
||||
if (!ide.$scope.hasLintingError)
|
||||
$scope.recompile()
|
||||
, 3000)
|
||||
]
|
|
@ -73,6 +73,11 @@ define [
|
|||
$scope.pdf.view = 'errors'
|
||||
$scope.pdf.renderingError = true
|
||||
|
||||
ide.$scope.$on "ide:opAcknowledged", _.debounce(() ->
|
||||
if (!ide.$scope.hasLintingError)
|
||||
$scope.recompile()
|
||||
, 3000)
|
||||
|
||||
# abort compile if syntax checks fail
|
||||
$scope.stop_on_validation_error = localStorage("stop_on_validation_error:#{$scope.project_id}")
|
||||
$scope.stop_on_validation_error ?= true # turn on for all users by default
|
||||
|
|
Loading…
Add table
Reference in a new issue