mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-18 02:32:15 -05:00
Remove deprecated event handlers, conditionally add the new ones in the Ace wrapper directive.
This commit is contained in:
parent
f170fd4b83
commit
4bba8e8977
2 changed files with 5 additions and 7 deletions
|
@ -244,6 +244,8 @@ define [
|
||||||
scope.eventsBridge.emit "aceScrollbarVisibilityChanged", vRenderer.scrollBarV.isVisible, vRenderer.scrollBarV.width
|
scope.eventsBridge.emit "aceScrollbarVisibilityChanged", vRenderer.scrollBarV.isVisible, vRenderer.scrollBarV.width
|
||||||
|
|
||||||
if scope.eventsBridge?
|
if scope.eventsBridge?
|
||||||
|
editor.renderer.on "scrollbarVisibilityChanged", onScrollbarVisibilityChanged
|
||||||
|
|
||||||
scope.eventsBridge.on "externalScroll", (position) ->
|
scope.eventsBridge.on "externalScroll", (position) ->
|
||||||
editor.getSession().setScrollTop(position)
|
editor.getSession().setScrollTop(position)
|
||||||
|
|
||||||
|
@ -298,8 +300,8 @@ define [
|
||||||
# deletes and then inserts document content
|
# deletes and then inserts document content
|
||||||
session.setAnnotations scope.annotations
|
session.setAnnotations scope.annotations
|
||||||
|
|
||||||
|
if scope.eventsBridge?
|
||||||
session.on "changeScrollTop", onScroll
|
session.on "changeScrollTop", onScroll
|
||||||
editor.renderer.on "scrollbarVisibilityChanged", onScrollbarVisibilityChanged
|
|
||||||
|
|
||||||
setTimeout () ->
|
setTimeout () ->
|
||||||
# Let any listeners init themselves
|
# Let any listeners init themselves
|
||||||
|
|
|
@ -19,10 +19,6 @@ define [
|
||||||
adding: false
|
adding: false
|
||||||
content: ""
|
content: ""
|
||||||
|
|
||||||
# DEPRECATED Used to communicate between Ace and reviewPanelSorted directive
|
|
||||||
$scope.scrollBindings =
|
|
||||||
reviewPanelEvents: new EventEmitter()
|
|
||||||
|
|
||||||
$scope.reviewPanelEventsBridge = new EventEmitter()
|
$scope.reviewPanelEventsBridge = new EventEmitter()
|
||||||
|
|
||||||
changesTrackers = {}
|
changesTrackers = {}
|
||||||
|
|
Loading…
Reference in a new issue