Avoid flickering when elements enter the review panel.

This commit is contained in:
Paulo Reis 2017-06-06 16:11:00 +01:00
parent 81a5a5311d
commit afa011c813
2 changed files with 13 additions and 3 deletions

View file

@ -63,7 +63,10 @@ define [
# Put the focused entry as close to where it wants to be as possible # 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_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) focused_entry.$indicator_el.css(top: focused_entry_top)
positionLayoutEl(focused_entry.$callout_el, focused_entry.scope.entry.screenPos.y, 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 height = entry.height
top = Math.max(original_top, previousBottom + PADDING) top = Math.max(original_top, previousBottom + PADDING)
previousBottom = top + height previousBottom = top + height
entry.$box_el.css(top: top) entry.$box_el.css(
top: top
visibility: "visible"
)
entry.$indicator_el.css(top: top) entry.$indicator_el.css(top: top)
positionLayoutEl(entry.$callout_el, original_top, top) positionLayoutEl(entry.$callout_el, original_top, top)
sl_console.log "ENTRY", {entry: entry.scope.entry, top} sl_console.log "ENTRY", {entry: entry.scope.entry, top}
@ -89,7 +95,10 @@ define [
bottom = Math.min(original_bottom, previousTop - PADDING) bottom = Math.min(original_bottom, previousTop - PADDING)
top = bottom - height top = bottom - height
previousTop = top previousTop = top
entry.$box_el.css(top: top) entry.$box_el.css(
top: top
visibility: "visible"
)
entry.$indicator_el.css(top: top) entry.$indicator_el.css(top: top)
positionLayoutEl(entry.$callout_el, original_top, top) positionLayoutEl(entry.$callout_el, original_top, top)
sl_console.log "ENTRY", {entry: entry.scope.entry, top} sl_console.log "ENTRY", {entry: entry.scope.entry, top}

View file

@ -261,6 +261,7 @@
} }
} }
.rp-state-current-file-expanded & { .rp-state-current-file-expanded & {
visibility: hidden;
left: 5px; left: 5px;
right: 5px; right: 5px;
width: auto; width: auto;