mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 04:06:39 -05:00
Remove deprecated event handlers, conditionally add the new ones in the Ace wrapper directive.
This commit is contained in:
parent
15d8f6c661
commit
df420e0d21
1 changed files with 5 additions and 3 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)
|
||||||
scope.eventsBridge.on "refreshScrollPosition", () ->
|
scope.eventsBridge.on "refreshScrollPosition", () ->
|
||||||
|
@ -301,9 +303,9 @@ define [
|
||||||
# need to set annotations after attaching because attaching
|
# need to set annotations after attaching because attaching
|
||||||
# deletes and then inserts document content
|
# deletes and then inserts document content
|
||||||
session.setAnnotations scope.annotations
|
session.setAnnotations scope.annotations
|
||||||
|
|
||||||
session.on "changeScrollTop", onScroll
|
if scope.eventsBridge?
|
||||||
editor.renderer.on "scrollbarVisibilityChanged", onScrollbarVisibilityChanged
|
session.on "changeScrollTop", onScroll
|
||||||
|
|
||||||
setTimeout () ->
|
setTimeout () ->
|
||||||
# Let any listeners init themselves
|
# Let any listeners init themselves
|
||||||
|
|
Loading…
Reference in a new issue