mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 11:31:55 +02:00
Emit event when textarea resizes; capture it in the review panel and trigger reflow.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user