mirror of https://github.com/status-im/codimd.git
Fixed cursor-tag and cursor-menu might not on correct position
This commit is contained in:
parent
6700f033ab
commit
176021ccd8
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue