mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Avoid flickering when elements enter the review panel.
This commit is contained in:
parent
81a5a5311d
commit
afa011c813
2 changed files with 13 additions and 3 deletions
|
@ -63,7 +63,10 @@ define [
|
|||
|
||||
# Put the focused entry as close to where it wants to be as possible
|
||||
focused_entry_top = Math.max(focused_entry.scope.entry.screenPos.y, TOOLBAR_HEIGHT)
|
||||
focused_entry.$box_el.css(top: focused_entry_top)
|
||||
focused_entry.$box_el.css(
|
||||
top: focused_entry_top
|
||||
visibility: "visible"
|
||||
)
|
||||
focused_entry.$indicator_el.css(top: focused_entry_top)
|
||||
positionLayoutEl(focused_entry.$callout_el, focused_entry.scope.entry.screenPos.y, focused_entry_top)
|
||||
|
||||
|
@ -73,7 +76,10 @@ define [
|
|||
height = entry.height
|
||||
top = Math.max(original_top, previousBottom + PADDING)
|
||||
previousBottom = top + height
|
||||
entry.$box_el.css(top: top)
|
||||
entry.$box_el.css(
|
||||
top: top
|
||||
visibility: "visible"
|
||||
)
|
||||
entry.$indicator_el.css(top: top)
|
||||
positionLayoutEl(entry.$callout_el, original_top, top)
|
||||
sl_console.log "ENTRY", {entry: entry.scope.entry, top}
|
||||
|
@ -89,7 +95,10 @@ define [
|
|||
bottom = Math.min(original_bottom, previousTop - PADDING)
|
||||
top = bottom - height
|
||||
previousTop = top
|
||||
entry.$box_el.css(top: top)
|
||||
entry.$box_el.css(
|
||||
top: top
|
||||
visibility: "visible"
|
||||
)
|
||||
entry.$indicator_el.css(top: top)
|
||||
positionLayoutEl(entry.$callout_el, original_top, top)
|
||||
sl_console.log "ENTRY", {entry: entry.scope.entry, top}
|
||||
|
|
|
@ -261,6 +261,7 @@
|
|||
}
|
||||
}
|
||||
.rp-state-current-file-expanded & {
|
||||
visibility: hidden;
|
||||
left: 5px;
|
||||
right: 5px;
|
||||
width: auto;
|
||||
|
|
Loading…
Reference in a new issue