mirror of
https://github.com/atom/atom.git
synced 2026-02-13 08:04:56 -05:00
Stop reporting scroll positions to the model
This commit is contained in:
@@ -54,10 +54,6 @@ class TextEditorPresenter
|
||||
@model.setWidth(@contentFrameWidth) if @contentFrameWidth?
|
||||
@model.setLineHeightInPixels(@lineHeight) if @lineHeight?
|
||||
@model.setDefaultCharWidth(@baseCharacterWidth) if @baseCharacterWidth?
|
||||
@model.setScrollTop(@scrollTop) if @scrollTop?
|
||||
@model.setScrollLeft(@scrollLeft) if @scrollLeft?
|
||||
@model.setVerticalScrollbarWidth(@measuredVerticalScrollbarWidth) if @measuredVerticalScrollbarWidth?
|
||||
@model.setHorizontalScrollbarHeight(@measuredHorizontalScrollbarHeight) if @measuredHorizontalScrollbarHeight?
|
||||
|
||||
# Private: Determines whether {TextEditorPresenter} is currently batching changes.
|
||||
# Returns a {Boolean}, `true` if is collecting changes, `false` if is applying them.
|
||||
@@ -1538,13 +1534,11 @@ class TextEditorPresenter
|
||||
scrollLeft = Math.round(@constrainScrollLeft(@pendingScrollLeft))
|
||||
if scrollLeft isnt @scrollLeft and not Number.isNaN(scrollLeft)
|
||||
@scrollLeft = scrollLeft
|
||||
@model.setScrollLeft(scrollLeft)
|
||||
|
||||
commitPendingScrollTopPosition: ->
|
||||
scrollTop = Math.round(@constrainScrollTop(@pendingScrollTop))
|
||||
if scrollTop isnt @scrollTop and not Number.isNaN(scrollTop)
|
||||
@scrollTop = scrollTop
|
||||
@model.setScrollTop(scrollTop)
|
||||
|
||||
updateScrollPosition: ->
|
||||
@commitPendingLogicalScrollPosition() if @pendingScrollLogicalPosition?
|
||||
|
||||
Reference in New Issue
Block a user