mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-25 13:41:12 +00:00
Update entry truncating logic while typing.
This commit is contained in:
parent
329c6af168
commit
49fe8ef3a3
2 changed files with 10 additions and 4 deletions
|
@ -13,10 +13,13 @@ define [
|
|||
onIndicatorClick: "&"
|
||||
link: (scope, element, attrs) ->
|
||||
scope.contentLimit = 40
|
||||
scope.needsCollapsing = scope.entry.content.length > scope.contentLimit
|
||||
scope.isCollapsed = true
|
||||
scope.needsCollapsing = false
|
||||
|
||||
scope.toggleCollapse = () ->
|
||||
scope.isCollapsed = !scope.isCollapsed
|
||||
$timeout () ->
|
||||
scope.$emit "review-panel:layout"
|
||||
scope.$emit "review-panel:layout"
|
||||
|
||||
scope.$watch "entry.content.length", (contentLength) ->
|
||||
scope.needsCollapsing = contentLength > scope.contentLimit
|
|
@ -11,10 +11,13 @@ define [
|
|||
onDelete: "&"
|
||||
link: (scope, element, attrs) ->
|
||||
scope.contentLimit = 40
|
||||
scope.needsCollapsing = scope.thread.content.length > scope.contentLimit
|
||||
scope.needsCollapsing = false
|
||||
scope.isCollapsed = true
|
||||
|
||||
scope.toggleCollapse = () ->
|
||||
scope.isCollapsed = !scope.isCollapsed
|
||||
$timeout () ->
|
||||
scope.$emit "review-panel:layout"
|
||||
scope.$emit "review-panel:layout"
|
||||
|
||||
scope.$watch "thread.content.length", (contentLength) ->
|
||||
scope.needsCollapsing = contentLength > scope.contentLimit
|
Loading…
Reference in a new issue