mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove presenter as a dependency where possible
Although we have a couple of components which still access it, we agreed it would have been just better to avoid relying on `TextEditorPresenter` where possible and use it purposefully in other places (e.g. `LinesComponent` which needs it to store text measurements). /cc: @jssln
This commit is contained in:
@@ -14,7 +14,7 @@ class LinesComponent extends TiledComponent
|
||||
@domNode = document.createElement('div')
|
||||
@domNode.classList.add('lines')
|
||||
|
||||
@cursorsComponent = new CursorsComponent(@presenter)
|
||||
@cursorsComponent = new CursorsComponent
|
||||
@domNode.appendChild(@cursorsComponent.getDomNode())
|
||||
|
||||
if @useShadowDOM
|
||||
@@ -95,8 +95,3 @@ class LinesComponent extends TiledComponent
|
||||
component.clearMeasurements()
|
||||
|
||||
@presenter.clearScopedCharacterWidths()
|
||||
|
||||
lineNodeForScreenRow: (screenRow) ->
|
||||
tile = @presenter.tileForRow(screenRow)
|
||||
|
||||
@componentsByTileId[tile]?.lineNodeForScreenRow(screenRow)
|
||||
|
||||
Reference in New Issue
Block a user