Fixed cursor-tag and cursor-menu might not on correct position

This commit is contained in:
Cheng-Han, Wu 2016-02-11 02:38:19 -06:00
parent 6700f033ab
commit 176021ccd8
1 changed files with 2 additions and 0 deletions

View File

@ -1781,6 +1781,7 @@ function checkCursorTag(coord, ele) {
buildMapInner(); buildMapInner();
var left = coord.left; var left = coord.left;
var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top; var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top;
top -= dropdown.closest('.CodeMirror-sizer > *').position().top;
var offsetLeft = -3; var offsetLeft = -3;
var offsetTop = defaultTextHeight; var offsetTop = defaultTextHeight;
var statusBarHeight = 0; var statusBarHeight = 0;
@ -2354,6 +2355,7 @@ function checkCursorMenu() {
buildMapInner(); buildMapInner();
var left = coord.left; var left = coord.left;
var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top; var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top;
top -= dropdown.closest('.CodeMirror-sizer > *').position().top;
var offsetLeft = 0; var offsetLeft = 0;
var offsetTop = defaultTextHeight; var offsetTop = defaultTextHeight;
var statusBarHeight = 0; var statusBarHeight = 0;