Skip to content

Commit 02456b6

Browse files
committed
Merge pull request #52 from fundon/dev
find-and-replace and git-diff now available
2 parents d704e05 + 9288210 commit 02456b6

File tree

7 files changed

+33
-58
lines changed

7 files changed

+33
-58
lines changed

History.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.7.0 / 2014-04-05
2+
==================
3+
4+
* use `prolix` mixin for debug
5+
* add plugins list
6+
* `find-and-replace` and `git-diff` now available!
7+
18
0.6.0 / 2014-04-04
29
==================
310

Readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ apm install minimap
1616
* Multiple Panes
1717
* Responsive
1818
* Mouse wheel and click-to-scroll _(no animation)_
19-
* drag-to-scroll
19+
* Drag-to-scroll
2020

2121
### Shortcuts
2222

@@ -27,11 +27,16 @@ apm install minimap
2727

2828
https://github.com/fundon/atom-minimap/graphs/contributors
2929

30+
### Plugins
31+
32+
The minimap can be augmented with plugins, belows the list of available plugins so far:
33+
34+
* [Find And Replace](https://atom.io/packages/minimap-find-and-replace)
35+
* [Git Diff](https://atom.io/packages/minimap-git-diff)
3036

3137
### Roadmap
3238

3339
* Custom style
34-
* Sync editing
3540
* Smooth animation
3641

3742
### License

lib/minimap-editor-view.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{EditorView, ScrollView, $} = require 'atom'
22
{Emitter} = require 'emissary'
3-
Debug = require './mixins/debug'
3+
Debug = require 'prolix'
44

55
module.exports =
66
class MinimapEditorView extends ScrollView
77
Emitter.includeInto(this)
8-
Debug.includeInto(this)
8+
Debug('minimap').includeInto(this)
99

1010
@content: ->
1111
@div class: 'minimap-editor editor editor-colors', =>

lib/minimap-view.coffee

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{$, View} = require 'atom'
22

33
MinimapEditorView = require './minimap-editor-view'
4-
Debug = require './mixins/debug'
4+
Debug = require 'prolix'
55

66
CONFIGS = require './config'
77

88
module.exports =
99
class MinimapView extends View
10-
Debug.includeInto(this)
10+
Debug('minimap').includeInto(this)
1111

1212
@content: ->
1313
@div class: 'minimap', =>
@@ -22,7 +22,7 @@ class MinimapView extends View
2222

2323
# VIEW CREATION/DESTRUCTION
2424

25-
constructor: (@paneView, @allowDebug) ->
25+
constructor: (@paneView) ->
2626
super
2727

2828
@scaleX = 0.2
@@ -33,7 +33,6 @@ class MinimapView extends View
3333
@transform @miniWrapper[0], @minimapScale
3434
# dragging's status
3535
@isPressed = false
36-
@miniEditorView.allowDebug = @allowDebug
3736

3837
initialize: ->
3938
@on 'mousewheel', @onMouseWheel

lib/minimap.coffee

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{Emitter} = require 'emissary'
22
MinimapView = require './minimap-view'
3+
Debug = require 'prolix'
34

45
require '../vendor/resizeend'
56

67
class Minimap
78
Emitter.includeInto(this)
9+
Debug('minimap').includeInto(this)
810

911
# We'll be storing each MinimapView using the id of their PaneView
1012
minimapViews: {}
@@ -13,11 +15,8 @@ class Minimap
1315
# minimapViews object will never be set to null.
1416
active: false
1517

16-
# Does the minimap debug features are activated on toggle
17-
allowDebug: false
18-
1918
activate: ->
20-
atom.workspaceView.command 'minimap:toggle', => @toggle()
19+
atom.workspaceView.command 'minimap:toggle', => @toggleNoDebug()
2120
atom.workspaceView.command 'minimap:toggle-debug', => @toggleDebug()
2221

2322
deactivate: ->
@@ -26,8 +25,7 @@ class Minimap
2625
@minimapViews = {}
2726
@emit('deactivated')
2827

29-
toggle: (debugMode=false) ->
30-
@allowDebug = debugMode
28+
toggle: () ->
3129
if @active
3230
@active = false
3331
@deactivate()
@@ -37,7 +35,12 @@ class Minimap
3735
@emit('activated')
3836

3937
toggleDebug: ->
40-
@toggle(true)
38+
@getChannel().activate()
39+
@toggle()
40+
41+
toggleNoDebug: ->
42+
@getChannel().deactivate()
43+
@toggle()
4144

4245
updateAllViews: ->
4346
view.onScrollViewResized() for id,view of @minimapViews
@@ -55,7 +58,7 @@ class Minimap
5558
# the callback.
5659
@eachPaneViewSubscription = atom.workspaceView.eachPaneView (paneView) =>
5760
paneId = paneView.model.id
58-
view = new MinimapView(paneView, @allowDebug)
61+
view = new MinimapView(paneView)
5962
view.onActiveItemChanged(paneView.getActiveItem())
6063
@updateAllViews()
6164

lib/mixins/debug.coffee

Lines changed: 0 additions & 40 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "minimap",
33
"main": "./lib/minimap",
4-
"version": "0.6.0",
4+
"version": "0.7.0",
55
"private": true,
66
"description": "A preview of the full source code.",
77
"author": "Fangdun Cai <[email protected]>",
@@ -26,6 +26,7 @@
2626
},
2727
"dependencies": {
2828
"emissary": "1.x",
29-
"mixto": "1.x"
29+
"mixto": "1.x",
30+
"prolix": "1.x"
3031
}
3132
}

0 commit comments

Comments
 (0)