mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Remove resize listeners from editor
pollDOM will always be called when window is resized
This commit is contained in:
committed by
Nathan Sobo
parent
96874d68d8
commit
40ba0da4f5
@@ -107,7 +107,6 @@ class TextEditorComponent
|
||||
@disposables.dispose()
|
||||
@presenter.destroy()
|
||||
@gutterContainerComponent?.destroy()
|
||||
window.removeEventListener 'resize', @requestHeightAndWidthMeasurement
|
||||
|
||||
getDomNode: ->
|
||||
@domNode
|
||||
@@ -224,7 +223,6 @@ class TextEditorComponent
|
||||
@domNode.addEventListener 'textInput', @onTextInput
|
||||
@scrollViewNode.addEventListener 'mousedown', @onMouseDown
|
||||
@scrollViewNode.addEventListener 'scroll', @onScrollViewScroll
|
||||
window.addEventListener 'resize', @requestHeightAndWidthMeasurement
|
||||
|
||||
@listenForIMEEvents()
|
||||
@trackSelectionClipboard() if process.platform is 'linux'
|
||||
@@ -589,15 +587,6 @@ class TextEditorComponent
|
||||
else
|
||||
@wasVisible = false
|
||||
|
||||
requestHeightAndWidthMeasurement: =>
|
||||
return if @heightAndWidthMeasurementRequested
|
||||
|
||||
@heightAndWidthMeasurementRequested = true
|
||||
requestAnimationFrame =>
|
||||
@heightAndWidthMeasurementRequested = false
|
||||
@measureDimensions()
|
||||
@measureWindowSize()
|
||||
|
||||
# Measure explicitly-styled height and width and relay them to the model. If
|
||||
# these values aren't explicitly styled, we assume the editor is unconstrained
|
||||
# and use the scrollHeight / scrollWidth as its height and width in
|
||||
|
||||
Reference in New Issue
Block a user