mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'ja-review-panel' of github.com:sharelatex/web-sharelatex into ja-review-panel
This commit is contained in:
commit
52ca272ae8
3 changed files with 11 additions and 4 deletions
|
@ -5,6 +5,8 @@ define [
|
||||||
"ide/review-panel/ChangesTracker"
|
"ide/review-panel/ChangesTracker"
|
||||||
], (App, EventEmitter, ColorManager, ChangesTracker) ->
|
], (App, EventEmitter, ColorManager, ChangesTracker) ->
|
||||||
App.controller "ReviewPanelController", ($scope, $element, ide, $timeout) ->
|
App.controller "ReviewPanelController", ($scope, $element, ide, $timeout) ->
|
||||||
|
$reviewPanelEl = $element.find "#review-panel"
|
||||||
|
|
||||||
$scope.SubViews =
|
$scope.SubViews =
|
||||||
CUR_FILE : "cur_file"
|
CUR_FILE : "cur_file"
|
||||||
OVERVIEW : "overview"
|
OVERVIEW : "overview"
|
||||||
|
@ -21,6 +23,12 @@ define [
|
||||||
|
|
||||||
$scope.reviewPanelEventsBridge = new EventEmitter()
|
$scope.reviewPanelEventsBridge = new EventEmitter()
|
||||||
|
|
||||||
|
$scope.reviewPanelEventsBridge.on "aceScrollbarVisibilityChanged", (isVisible, scrollbarWidth) ->
|
||||||
|
if isVisible
|
||||||
|
$reviewPanelEl.css "right", "#{ scrollbarWidth }px"
|
||||||
|
else
|
||||||
|
$reviewPanelEl.css "right", "0"
|
||||||
|
|
||||||
changesTrackers = {}
|
changesTrackers = {}
|
||||||
|
|
||||||
$scope.$watch "editor.open_doc_id", (open_doc_id) ->
|
$scope.$watch "editor.open_doc_id", (open_doc_id) ->
|
||||||
|
|
|
@ -111,9 +111,6 @@ define [
|
||||||
# need to trigger the event back to the original panel.
|
# need to trigger the event back to the original panel.
|
||||||
ignoreNextPanelEvent = false
|
ignoreNextPanelEvent = false
|
||||||
ignoreNextAceEvent = false
|
ignoreNextAceEvent = false
|
||||||
|
|
||||||
handleScrollbarVisibilityChanged = (isVisible, scrollbarWidth) ->
|
|
||||||
console.log isVisible, scrollbarWidth
|
|
||||||
|
|
||||||
scrollPanel = (scrollTop, height) ->
|
scrollPanel = (scrollTop, height) ->
|
||||||
if ignoreNextAceEvent
|
if ignoreNextAceEvent
|
||||||
|
@ -132,5 +129,4 @@ define [
|
||||||
scope.reviewPanelEventsBridge.emit "externalScroll", scrollTop
|
scope.reviewPanelEventsBridge.emit "externalScroll", scrollTop
|
||||||
|
|
||||||
scope.reviewPanelEventsBridge.on "aceScroll", scrollPanel
|
scope.reviewPanelEventsBridge.on "aceScroll", scrollPanel
|
||||||
scope.reviewPanelEventsBridge.on "aceScrollbarVisibilityChanged", handleScrollbarVisibilityChanged
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -503,6 +503,9 @@
|
||||||
right: @review-off-width;
|
right: @review-off-width;
|
||||||
.ace-editor-body {
|
.ace-editor-body {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
.ace_scrollbar-v {
|
||||||
|
right: -@review-off-width;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue