We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ae0dcc commit d44dd77Copy full SHA for d44dd77
lib/minimap-element.js
@@ -1178,12 +1178,10 @@ class MinimapElement {
1178
if (!this.minimap) { return }
1179
if (!isLeftMouse && !isMiddleMouse) { return }
1180
1181
- const { top } = this.visibleArea.getBoundingClientRect()
1182
- const { top: offsetTop } = this.getBoundingClientRect()
1183
-
1184
- const dragOffset = y - top
1185
1186
- const initial = { dragOffset, offsetTop }
+ const initial = {
+ dragOffset: y - this.visibleArea.getBoundingClientRect().top,
+ offsetTop: this.getBoundingClientRect().top
+ }
1187
1188
const mousemoveHandler = (e) => this.drag(extractMouseEventData(e), initial)
1189
const mouseupHandler = (e) => this.endDrag()
0 commit comments