Skip to content

Commit

Permalink
Use minimap custom render (close #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodalgaard committed Nov 17, 2015
1 parent 63ea7bb commit 4a9691c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions lib/expose-tab-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,20 @@ class ExposeView extends View
minimap = minimapAPI.standAloneMinimapForEditor(@item)
minimapElement = atom.views.getView(minimap)

# Override minimap scroll, remove controls and set custom
# styling, scaling and position.
# Override minimap scroll, remove controls and set custom style
minimapElement.controls?.remove()
minimapElement.style.cssText = '''
width: 130px;
height: 90px;
width: 190px;
height: 130px;
left: 10px;
pointer-events: none;
transform: scale3d(1.5, 1.5, 1) translate(-20px, 15px);
// transform: scale3d(1.5, 1.5, 1) translate(-20px, 15px);
'''

minimap.setCharWidth(2)
minimap.setCharHeight(4)
minimap.setInterline(2)

@tabBody.html minimapElement
else
@tabBody.html $$ ->
Expand Down
2 changes: 1 addition & 1 deletion styles/expose.less
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ atom-workspace-axis.expose-blur {
padding-bottom: 4px;
// Do not jump when adding a border
atom-text-editor-minimap {
right: -1px;
margin-left: -1px;
}
}
}
Expand Down

0 comments on commit 4a9691c

Please sign in to comment.