Tooltip css tweak
This commit is contained in:
parent
7ae929aecf
commit
4d43496201
2 changed files with 8 additions and 4 deletions
|
|
@ -252,8 +252,9 @@
|
|||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
|
||||
color: black;
|
||||
display: inline-block;
|
||||
max-width: 500px;
|
||||
padding: 4px;
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
z-index: 300;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
|
|
@ -261,6 +262,10 @@
|
|||
cursor: default;
|
||||
white-space: pre-line;
|
||||
word-wrap: break-word;
|
||||
line-height: normal;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.ace_folding-enabled > .ace_gutter-cell {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ function GutterHandler(mouseHandler) {
|
|||
function createTooltip() {
|
||||
tooltip = dom.createElement("div");
|
||||
tooltip.className = "ace_gutter-tooltip";
|
||||
tooltip.style.maxWidth = "500px";
|
||||
tooltip.style.display = "none";
|
||||
editor.container.appendChild(tooltip);
|
||||
}
|
||||
|
|
@ -111,10 +110,10 @@ function GutterHandler(mouseHandler) {
|
|||
|
||||
function moveTooltip(e) {
|
||||
var rect = editor.renderer.$gutter.getBoundingClientRect();
|
||||
tooltip.style.left = e.x - rect.left + 15 + "px";
|
||||
tooltip.style.left = e.x + 15 + "px";
|
||||
if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
|
||||
tooltip.style.bottom = "";
|
||||
tooltip.style.top = e.y - rect.top + 15 + "px";
|
||||
tooltip.style.top = e.y + 15 + "px";
|
||||
} else {
|
||||
tooltip.style.top = "";
|
||||
tooltip.style.bottom = rect.bottom - e.y + 5 + "px";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue