Ver Fonte

Avoid flickering when elements enter the review panel.

Paulo Reis há 9 anos atrás
pai
commit
afa011c813

+ 12 - 3
services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee

@@ -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}

+ 1 - 0
services/web/public/stylesheets/app/editor/review-panel.less

@@ -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;