mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Measure DOM in EditorComponent when a stylesheet is updated
This commit is contained in:
@@ -176,7 +176,7 @@ EditorComponent = React.createClass
|
||||
@listenForDOMEvents()
|
||||
@listenForCommands()
|
||||
|
||||
@subscribe atom.themes, 'stylesheet-added stylsheet-removed', @onStylesheetsChanged
|
||||
@subscribe atom.themes, 'stylesheet-added stylesheet-removed stylesheet-updated', @onStylesheetsChanged
|
||||
@subscribe scrollbarStyle.changes, @refreshScrollbars
|
||||
|
||||
if @visible = @isVisible()
|
||||
|
||||
@@ -359,8 +359,10 @@ class WorkspaceView extends View
|
||||
atom.themes.applyStylesheet('global-editor-styles', '.editor {}')
|
||||
styleNode = atom.themes.stylesheetElementForId('global-editor-styles')[0]
|
||||
|
||||
editorRule = styleNode.sheet.cssRules[0]
|
||||
{sheet} = styleNode
|
||||
editorRule = sheet.cssRules[0]
|
||||
editorRule.style[property] = value
|
||||
atom.themes.emit 'stylesheet-updated', sheet
|
||||
atom.themes.emit 'stylesheets-changed'
|
||||
|
||||
# Deprecated
|
||||
|
||||
Reference in New Issue
Block a user