mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fix missing variables in pdf sync
This commit is contained in:
parent
c815ba6ed2
commit
830d15136d
2 changed files with 7 additions and 4 deletions
|
@ -129,11 +129,11 @@ module.exports = CompileController =
|
|||
return next(new Error("invalid h parameter"))
|
||||
if not v?.match(/^\d+\.\d+$/)
|
||||
return next(new Error("invalid v parameter"))
|
||||
url = CompileController._getUrl(project_id, user_id, "sync/pdf")
|
||||
destination = {url: url, qs: {page, h, v}}
|
||||
# whether this request is going to a per-user container
|
||||
CompileController._compileAsUser req, (error, user_id) ->
|
||||
return next(error) if error?
|
||||
url = CompileController._getUrl(project_id, user_id, "sync/pdf")
|
||||
destination = {url: url, qs: {page, h, v}}
|
||||
CompileController.proxyToClsi(project_id, destination, req, res, next)
|
||||
|
||||
proxySyncCode: (req, res, next = (error) ->) ->
|
||||
|
@ -145,10 +145,10 @@ module.exports = CompileController =
|
|||
return next(new Error("invalid line parameter"))
|
||||
if not column?.match(/^\d+$/)
|
||||
return next(new Error("invalid column parameter"))
|
||||
url = CompileController._getUrl(project_id, user_id, "sync/code")
|
||||
destination = {url:url, qs: {file, line, column}}
|
||||
CompileController._compileAsUser req, (error, user_id) ->
|
||||
return next(error) if error?
|
||||
url = CompileController._getUrl(project_id, user_id, "sync/code")
|
||||
destination = {url:url, qs: {file, line, column}}
|
||||
CompileController.proxyToClsi(project_id, destination, req, res, next)
|
||||
|
||||
proxyToClsi: (project_id, url, req, res, next = (error) ->) ->
|
||||
|
|
|
@ -301,6 +301,9 @@ define [
|
|||
$scope.startedFreeTrial = true
|
||||
|
||||
App.factory "synctex", ["ide", "$http", "$q", (ide, $http, $q) ->
|
||||
# enable per-user containers if querystring includes isolated=true
|
||||
perUserCompile = window.location?.search?.match(/isolated=true/)? or undefined
|
||||
|
||||
synctex =
|
||||
syncToPdf: (cursorPosition) ->
|
||||
deferred = $q.defer()
|
||||
|
|
Loading…
Reference in a new issue