mirror of
https://github.com/atom/atom.git
synced 2026-02-13 08:04:56 -05:00
Make each section of presenter state self-contained
This means we have some duplicated values in different parts of the tree, but it’s cleaner in the view since each component only consumes a single object. Seems like the presenter should convey the correct data to the correct locations and minimize the logic in the view. A few duplicated integers is a reasonable trade-off.
This commit is contained in:
@@ -27,8 +27,7 @@ class OverlayManager
|
||||
itemHeight = item.offsetHeight
|
||||
|
||||
|
||||
{scrollTop} = presenter.state
|
||||
{scrollLeft} = presenter.state.content
|
||||
{scrollTop, scrollLeft} = presenter.state.content
|
||||
|
||||
left = pixelPosition.left
|
||||
if left + itemWidth - scrollLeft > presenter.getContentFrameWidth() and left - itemWidth >= scrollLeft
|
||||
|
||||
Reference in New Issue
Block a user