Skip to content

Commit 218399f

Browse files
committed
remove triggerHandler
1 parent 0db4d71 commit 218399f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/minimap-view.coffee

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ class MinimapView extends View
3939
@on 'mousedown', '.minimap-visible-area', (e) =>
4040
isPressed = true
4141
@on 'mousemove.visible-area', (e) =>
42-
if isPressed
43-
@.triggerHandler 'mousedown', e
42+
@onMouseDown e if isPressed
4443
@on 'mouseup.visible-area', (e) =>
4544
isPressed = false
4645
@off '.visible-area'
@@ -181,16 +180,14 @@ class MinimapView extends View
181180
if wheelDeltaY
182181
@editorView.scrollTop(@editorView.scrollTop() - wheelDeltaY)
183182

184-
onMouseDown: (e, te) =>
183+
onMouseDown: (e) =>
185184
@isClicked = true
186185
e.preventDefault()
187186
e.stopPropagation()
188187
minimapHeight = @miniScrollView.outerHeight()
189188
miniVisibleAreaHeight = @miniVisibleArea.height()
190-
# `te` is a extraParameter of triggerHandler
191-
pageY = e.pageY || (te && te.pageY)
192189
# Overlayer's center-y
193-
y = pageY - @offset().top
190+
y = e.pageY - @offset().top
194191
y = y - @minimapScroll * @scaleY
195192
n = y / @scaleY
196193
top = n - miniVisibleAreaHeight / 2

0 commit comments

Comments
 (0)