Merge remote-tracking branch 'remotes/pull/1758'
This commit is contained in:
commit
f2da76daaf
3 changed files with 15 additions and 3 deletions
|
|
@ -1029,6 +1029,7 @@ var Editor = function(renderer, session) {
|
|||
this.getHighlightGutterLine = function() {
|
||||
return this.getOption("highlightGutterLine");
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines if the currently selected word should be highlighted.
|
||||
* @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
|
||||
|
|
@ -2432,6 +2433,7 @@ config.defineOptions(Editor.prototype, "editor", {
|
|||
dragDelay: "$mouseHandler",
|
||||
dragEnabled: "$mouseHandler",
|
||||
focusTimout: "$mouseHandler",
|
||||
tooltipFollowsMouse: "$mouseHandler",
|
||||
|
||||
firstLineNumber: "session",
|
||||
overwrite: "session",
|
||||
|
|
|
|||
|
|
@ -90,7 +90,16 @@ function GutterHandler(mouseHandler) {
|
|||
tooltip.show();
|
||||
editor.on("mousewheel", hideTooltip);
|
||||
|
||||
moveTooltip(mouseEvent);
|
||||
if (mouseHandler.$tooltipFollowsMouse) {
|
||||
moveTooltip(mouseEvent);
|
||||
} else {
|
||||
var gutterElement = gutter.$cells[row].element;
|
||||
var rect = gutterElement.getBoundingClientRect();
|
||||
var tooltipLeft = rect.right;
|
||||
var tooltipTop = rect.bottom;
|
||||
tooltip.style.left = tooltipLeft + "px";
|
||||
tooltip.style.top = tooltipTop - 5 + "px";
|
||||
}
|
||||
}
|
||||
|
||||
function hideTooltip() {
|
||||
|
|
@ -112,7 +121,7 @@ function GutterHandler(mouseHandler) {
|
|||
if (dom.hasCssClass(target, "ace_fold-widget"))
|
||||
return hideTooltip();
|
||||
|
||||
if (tooltipAnnotation)
|
||||
if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)
|
||||
moveTooltip(e);
|
||||
|
||||
mouseEvent = e;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@ config.defineOptions(MouseHandler.prototype, "mouseHandler", {
|
|||
scrollSpeed: {initialValue: 2},
|
||||
dragDelay: {initialValue: 150},
|
||||
dragEnabled: {initialValue: true},
|
||||
focusTimout: {initialValue: 0}
|
||||
focusTimout: {initialValue: 0},
|
||||
tooltipFollowsMouse: {initialValue: true}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue