mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Extract timeout constant
This commit is contained in:
parent
a9e94f6a6d
commit
ce630e4971
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,8 @@ define [
|
|||
"libs/bib-log-parser"
|
||||
"services/log-hints-feedback"
|
||||
], (App, Ace, HumanReadableLogs, BibLogParser) ->
|
||||
AUTO_COMPILE_TIMEOUT = 3000
|
||||
|
||||
App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, logHintsFeedback, localStorage) ->
|
||||
# enable per-user containers by default
|
||||
perUserCompile = true
|
||||
|
@ -79,7 +81,7 @@ define [
|
|||
autoCompileListener = null
|
||||
toggleAutoCompile = (enabling) ->
|
||||
if enabling
|
||||
autoCompileListener = ide.$scope.$on "ide:opAcknowledged", _.debounce(triggerAutoCompile, 3000)
|
||||
autoCompileListener = ide.$scope.$on "ide:opAcknowledged", _.debounce(triggerAutoCompile, AUTO_COMPILE_TIMEOUT)
|
||||
else
|
||||
autoCompileListener() if autoCompileListener
|
||||
autoCompileListener = null
|
||||
|
|
Loading…
Reference in a new issue