Remove deprecated event handlers, conditionally add the new ones in the Ace wrapper directive.

This commit is contained in:
Paulo Reis 2016-11-17 10:51:17 +00:00 committed by James Allen
parent 15d8f6c661
commit df420e0d21

View file

@ -244,6 +244,8 @@ define [
scope.eventsBridge.emit "aceScrollbarVisibilityChanged", vRenderer.scrollBarV.isVisible, vRenderer.scrollBarV.width
if scope.eventsBridge?
editor.renderer.on "scrollbarVisibilityChanged", onScrollbarVisibilityChanged
scope.eventsBridge.on "externalScroll", (position) ->
editor.getSession().setScrollTop(position)
scope.eventsBridge.on "refreshScrollPosition", () ->
@ -302,8 +304,8 @@ define [
# deletes and then inserts document content
session.setAnnotations scope.annotations
session.on "changeScrollTop", onScroll
editor.renderer.on "scrollbarVisibilityChanged", onScrollbarVisibilityChanged
if scope.eventsBridge?
session.on "changeScrollTop", onScroll
setTimeout () ->
# Let any listeners init themselves