Skip to content

Commit

Permalink
🐛 Fix visible area spreading outside minimap in one-dark-ui
Browse files Browse the repository at this point in the history
In the latest version, `one-dark-ui` adds padding on workspace and some
pane.
  • Loading branch information
abe33 committed Apr 7, 2015
1 parent 731146b commit 12aadd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/minimap-element.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,16 @@ class MinimapElement extends HTMLElement

visibleAreaLeft = @minimap.getTextEditorScaledScrollLeft()
visibleAreaTop = @minimap.getTextEditorScaledScrollTop() - @minimap.getScrollTop()
visibleWidth = Math.min(@canvas.width / devicePixelRatio, @width)


@applyStyles @visibleArea,
width: @clientWidth + 'px'
width: visibleWidth + 'px'
height: @minimap.getTextEditorScaledHeight() + 'px'
transform: @makeTranslate(visibleAreaLeft, visibleAreaTop)

@applyStyles @controls,
width: Math.min(@canvas.width / devicePixelRatio, @width) + 'px'
width: visibleWidth + 'px'

canvasTop = @minimap.getFirstVisibleScreenRow() * @minimap.getLineHeight() - @minimap.getScrollTop()

Expand Down

0 comments on commit 12aadd2

Please sign in to comment.