Skip to content

Commit 9c3880a

Browse files
committed
fix(tooltip) getScrollTop/getScrollLeft moved to editor in Atom 1.1. beta Closes #647
1 parent 7e5283d commit 9c3880a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/main/atom/tooltipManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function attach(editorView, editor) {
4646
if (exprTypeTooltip)
4747
return;
4848
var pixelPt = pixelPositionFromMouseEvent(editorView, e);
49-
pixelPt.top += editor.displayBuffer.getScrollTop();
50-
pixelPt.left += editor.displayBuffer.getScrollLeft();
49+
pixelPt.top += editor.getScrollTop();
50+
pixelPt.left += editor.getScrollLeft();
5151
var screenPt = editor.screenPositionForPixelPosition(pixelPt);
5252
var bufferPt = editor.bufferPositionForScreenPosition(screenPt);
5353
var curCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column]);

lib/main/atom/tooltipManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export function attach(editorView: JQuery, editor: AtomCore.IEditor) {
6969
if (exprTypeTooltip) return;
7070

7171
var pixelPt = pixelPositionFromMouseEvent(editorView, e);
72-
pixelPt.top += editor.displayBuffer.getScrollTop();
73-
pixelPt.left += editor.displayBuffer.getScrollLeft();
72+
pixelPt.top += editor.getScrollTop();
73+
pixelPt.left += editor.getScrollLeft();
7474
var screenPt = editor.screenPositionForPixelPosition(pixelPt);
7575
var bufferPt = editor.bufferPositionForScreenPosition(screenPt);
7676
var curCharPixelPt = rawView.pixelPositionForBufferPosition([bufferPt.row, bufferPt.column]);

0 commit comments

Comments
 (0)