mitigation of tooltip flicker by making tooltip smaller

This commit is contained in:
azivner 2018-11-14 10:36:14 +01:00
parent fc9495bcdf
commit 7be85acf11
2 changed files with 8 additions and 3 deletions

View File

@ -106,7 +106,6 @@ async function renderTooltip(note, attributes) {
else if (note.type === 'image') {
content += $("<img>")
.prop("src", `/api/images/${note.noteId}/${note.title}`)
.prop("style", "max-width: 300px; max-height: 300px;")
.prop('outerHTML');
}
// other types of notes don't have tooltip preview

View File

@ -500,14 +500,20 @@ table.promoted-attributes-in-tooltip td, table.promoted-attributes-in-tooltip th
.tooltip-inner {
background-color: #fbfbfb !important;
max-width: 600px;
max-height: 500px;
max-width: 400px;
/* height needs to stay small because tooltip has problem when it can't fit to either top or bottom of the cursor */
max-height: 300px;
overflow: hidden;
color: black;
border: 1px solid #aaa;
text-align: left;
}
.tooltip-inner img {
max-width: 250px;
max-height: 250px;
}
.tooltip.show {
opacity: 1;
}