Skip to content

Commit

Permalink
🐛 Fix deprecation on theme observer
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Jan 21, 2015
1 parent 4017843 commit d1d183a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/minimap-element.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class MinimapElement extends HTMLElement
@subscriptions = new CompositeDisposable
@initializeContent()

@subscriptions.add atom.themes.onDidChangeActiveThemes =>
@requestForcedUpdate()

@observeConfig
'minimap.displayMinimapOnLeft': (displayMinimapOnLeft) =>
swapPosition = @minimap? and displayMinimapOnLeft isnt @displayMinimapOnLeft
Expand Down
4 changes: 2 additions & 2 deletions lib/minimap-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MinimapView extends View
@observer.observe @paneView, config

# Update the minimap whenever theme is reloaded
@subscriptions.add atom.themes.onDidReloadAll =>
@subscriptions.add atom.themes.onDidChangeActiveThemes =>
@updateTopPosition()
@updateMinimapView()

Expand Down Expand Up @@ -316,7 +316,7 @@ class MinimapView extends View

@css height: evh, bottom: height - evh # new line
height = evh # new line

minimapVisibilityRatio = miniScrollViewRect.height / height

@miniScroller.height(evh / minimapVisibilityRatio)
Expand Down

0 comments on commit d1d183a

Please sign in to comment.