mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 04:55:31 +00:00
Emit event when textarea resizes; capture it in the review panel and trigger reflow.
This commit is contained in:
parent
6304c213bd
commit
ce89714a48
2 changed files with 5 additions and 0 deletions
services/web/public/coffee
|
@ -9,6 +9,7 @@ define [
|
|||
fitHeight = el.prop("scrollHeight")
|
||||
|
||||
if fitHeight > curHeight and el.val() != ""
|
||||
scope.$emit "expandable-text-area:resize"
|
||||
el.css("height", fitHeight)
|
||||
|
||||
scope.$watch (() -> el.val()), resetHeight
|
||||
|
|
|
@ -33,6 +33,10 @@ define [
|
|||
$scope.$on "layout:pdf:resize", (event, state) ->
|
||||
$scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed)
|
||||
|
||||
$scope.$on "expandable-text-area:resize", (event) ->
|
||||
$timeout () ->
|
||||
$scope.$broadcast "review-panel:layout"
|
||||
|
||||
$scope.$watch "ui.pdfLayout", (layout) ->
|
||||
$scope.reviewPanel.layoutToLeft = (layout == "flat")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue