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') { else if (note.type === 'image') {
content += $("<img>") content += $("<img>")
.prop("src", `/api/images/${note.noteId}/${note.title}`) .prop("src", `/api/images/${note.noteId}/${note.title}`)
.prop("style", "max-width: 300px; max-height: 300px;")
.prop('outerHTML'); .prop('outerHTML');
} }
// other types of notes don't have tooltip preview // 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 { .tooltip-inner {
background-color: #fbfbfb !important; background-color: #fbfbfb !important;
max-width: 600px; max-width: 400px;
max-height: 500px; /* 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; overflow: hidden;
color: black; color: black;
border: 1px solid #aaa; border: 1px solid #aaa;
text-align: left; text-align: left;
} }
.tooltip-inner img {
max-width: 250px;
max-height: 250px;
}
.tooltip.show { .tooltip.show {
opacity: 1; opacity: 1;
} }