mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add timeout around reply layout render
This commit is contained in:
parent
7201bde2a3
commit
d447ebe304
2 changed files with 7 additions and 3 deletions
|
@ -3,7 +3,7 @@ define [
|
|||
"utils/EventEmitter"
|
||||
"ide/colors/ColorManager"
|
||||
], (App, EventEmitter, ColorManager) ->
|
||||
App.controller "ReviewPanelController", ($scope, $element, ide) ->
|
||||
App.controller "ReviewPanelController", ($scope, $element, ide, $timeout) ->
|
||||
$scope.reviewPanel =
|
||||
entries: {}
|
||||
trackNewChanges: false
|
||||
|
@ -103,7 +103,8 @@ define [
|
|||
}
|
||||
entry.replyContent = ""
|
||||
entry.replying = false
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
# TODO Just for prototyping purposes; remove afterwards
|
||||
window.setTimeout((() ->
|
||||
$scope.$applyAsync(() -> submitMockedReply(entry))
|
||||
|
@ -118,7 +119,8 @@ define [
|
|||
}
|
||||
entry.replyContent = ""
|
||||
entry.replying = false
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.cancelReply = (entry) ->
|
||||
entry.replying = false
|
||||
|
|
|
@ -5,6 +5,7 @@ define [
|
|||
return {
|
||||
link: (scope, element, attrs) ->
|
||||
layout = () ->
|
||||
sl_console.log "LAYOUT"
|
||||
entries = []
|
||||
for el in element.find(".rp-entry-wrapper")
|
||||
entries.push {
|
||||
|
@ -22,6 +23,7 @@ define [
|
|||
previousBottom = top + height
|
||||
entry.$box_el.css(top: top)
|
||||
entry.$callout_el.css(top: original_top + 15, height: top - original_top)
|
||||
sl_console.log "ENTRY", {entry: entry.scope.entry, top}
|
||||
|
||||
scope.$watch "reviewPanel.entryGeneration", (value) ->
|
||||
scope.$evalAsync () ->
|
||||
|
|
Loading…
Reference in a new issue