mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Rework DOM measurement to try to prevent measurement errors
* Simplify scrollbar refresh and measurement by using imperative DOM manipulation instead of React to hide/show scrollbars. * Rename `::performInitialMeasurement` to `::becameVisible` * Break `::checkForVisibilityChange` out of `::pollDOM` and use it in to check for the element becoming visible in `componentWillUpdate`. * Don't rely on stored visibility state anywhere. Always check again. This could potentially be cached for an update cycle but being wrong about this is disastrous so I'm being conservative.
This commit is contained in:
@@ -31,11 +31,11 @@ class DisplayBuffer extends Model
|
||||
scrollTop: 0
|
||||
scrollLeft: 0
|
||||
scrollWidth: 0
|
||||
verticalScrollbarWidth: 15
|
||||
horizontalScrollbarHeight: 15
|
||||
|
||||
verticalScrollMargin: 2
|
||||
horizontalScrollMargin: 6
|
||||
horizontalScrollbarHeight: 15
|
||||
verticalScrollbarWidth: 15
|
||||
scopedCharacterWidthsChangeCount: 0
|
||||
|
||||
constructor: ({tabLength, @editorWidthInChars, @tokenizedBuffer, buffer, @invisibles}={}) ->
|
||||
|
||||
Reference in New Issue
Block a user