mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Recalculate change offsets on editor resize
This commit is contained in:
parent
8d968f6865
commit
77c02042f8
1 changed files with 3 additions and 7 deletions
|
@ -9,7 +9,6 @@ define [
|
|||
@changesTracker = new ChangesTracker()
|
||||
@changeIdToMarkerIdMap = {}
|
||||
@enabled = false
|
||||
console.log "Track Changes", @$scope.reviewPanel
|
||||
|
||||
@changesTracker.on "insert:added", (change) =>
|
||||
@_onInsertAdded(change)
|
||||
|
@ -29,16 +28,13 @@ define [
|
|||
@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()
|
||||
|
|
Loading…
Reference in a new issue