mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Only show synctex controls when pdf layout is open
This commit is contained in:
parent
1cf508356c
commit
98d601fb66
3 changed files with 11 additions and 17 deletions
|
@ -33,7 +33,7 @@ div.full-size(
|
|||
include ./pdf
|
||||
|
||||
.ui-layout-resizer-controls.synctex-controls(
|
||||
ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs' && showControls"
|
||||
ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
|
||||
ng-controller="PdfSynctexController"
|
||||
)
|
||||
a.btn.btn-default.btn-xs(
|
||||
|
|
|
@ -72,7 +72,12 @@ define [
|
|||
repositionControls = () ->
|
||||
state = element.layout().readState()
|
||||
if state.east?
|
||||
element.find("> .ui-layout-resizer-controls").css({
|
||||
controls = element.find("> .ui-layout-resizer-controls")
|
||||
if state.east.initClosed
|
||||
controls.hide()
|
||||
else
|
||||
controls.show()
|
||||
controls.css({
|
||||
position: "absolute"
|
||||
right: state.east.size
|
||||
"z-index": 10
|
||||
|
|
|
@ -223,17 +223,6 @@ define [
|
|||
]
|
||||
|
||||
App.controller "PdfSynctexController", ["$scope", "synctex", "ide", ($scope, synctex, ide) ->
|
||||
$scope.showControls = true
|
||||
$scope.$on "layout:pdf:resize", (event, data) ->
|
||||
if data.east.initClosed
|
||||
$scope.showControls = false
|
||||
else
|
||||
$scope.showControls = true
|
||||
|
||||
setTimeout () ->
|
||||
$scope.$digest()
|
||||
, 0
|
||||
|
||||
@cursorPosition = null
|
||||
ide.$scope.$on "cursor:editor:update", (event, @cursorPosition) =>
|
||||
|
||||
|
|
Loading…
Reference in a new issue