From 12aadd2cd227b7ffe36401ff7a2530f25c59c64e Mon Sep 17 00:00:00 2001 From: abe33 Date: Tue, 7 Apr 2015 22:56:18 +0200 Subject: [PATCH] :bug: Fix visible area spreading outside minimap in one-dark-ui In the latest version, `one-dark-ui` adds padding on workspace and some pane. --- lib/minimap-element.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/minimap-element.coffee b/lib/minimap-element.coffee index d10727fa..44f52348 100644 --- a/lib/minimap-element.coffee +++ b/lib/minimap-element.coffee @@ -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()