Merge pull request #468 from sharelatex/ja-allow-overlapping-comments

Allo overlapping comments
This commit is contained in:
James Allen 2017-04-03 14:04:14 +01:00 committed by GitHub
commit efac6b70f4

View file

@ -300,13 +300,6 @@ define [
delete entries["add-comment"]
if selection
# Only show add comment if we're not already overlapping one
overlapping_comment = false
for id, entry of entries
if entry.type == "comment" and not $scope.reviewPanel.resolvedThreadIds[entry.thread_id]
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