From 77c02042f8dc6db9b4b5c8bd69a94553c7cab4c4 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 13 Oct 2016 12:09:18 +0100 Subject: [PATCH] Recalculate change offsets on editor resize --- .../aceEditor/track-changes/TrackChangesManager.coffee | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee index ef38ca6dfe..47026eeb04 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.coffee @@ -9,7 +9,6 @@ define [ @changesTracker = new ChangesTracker() @changeIdToMarkerIdMap = {} @enabled = false - console.log "Track Changes", @$scope.reviewPanel @changesTracker.on "insert:added", (change) => @_onInsertAdded(change) @@ -28,17 +27,14 @@ define [ setTimeout () => @checkMapping() , 100 - - # onScroll = () => - # @recalculateReviewEntriesScreenPositions() @editor.on "changeSession", (e) => e.oldSession?.getDocument().off "change", onChange e.session.getDocument().on "change", onChange - # e.oldSession?.off "changeScrollTop", onScroll - # e.session.on "changeScrollTop", onScroll @editor.getSession().getDocument().on "change", onChange - # @editor.getSession().on "changeScrollTop", onScroll + + @editor.renderer.on "resize", () => + @recalculateReviewEntriesScreenPositions() checkMapping: () -> session = @editor.getSession()