mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #468 from sharelatex/ja-allow-overlapping-comments
Allo overlapping comments
This commit is contained in:
commit
efac6b70f4
1 changed files with 5 additions and 12 deletions
|
@ -300,18 +300,11 @@ define [
|
||||||
|
|
||||||
delete entries["add-comment"]
|
delete entries["add-comment"]
|
||||||
if selection
|
if selection
|
||||||
# Only show add comment if we're not already overlapping one
|
entries["add-comment"] = {
|
||||||
overlapping_comment = false
|
type: "add-comment"
|
||||||
for id, entry of entries
|
offset: selection_offset_start
|
||||||
if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id]
|
length: selection_offset_end - selection_offset_start
|
||||||
unless entry.offset >= selection_offset_end or entry.offset + entry.content.length <= selection_offset_start
|
}
|
||||||
overlapping_comment = true
|
|
||||||
if !overlapping_comment
|
|
||||||
entries["add-comment"] = {
|
|
||||||
type: "add-comment"
|
|
||||||
offset: selection_offset_start
|
|
||||||
length: selection_offset_end - selection_offset_start
|
|
||||||
}
|
|
||||||
|
|
||||||
for id, entry of entries
|
for id, entry of entries
|
||||||
if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id]
|
if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id]
|
||||||
|
|
Loading…
Reference in a new issue