mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Update range tracker with new bulk method.
This commit is contained in:
parent
3ced808411
commit
03b8b72520
1 changed files with 15 additions and 0 deletions
|
@ -101,6 +101,21 @@ load = () ->
|
|||
return if !change?
|
||||
@_removeChange(change)
|
||||
|
||||
removeChangeIds: (change_to_remove_ids) ->
|
||||
return if !change_to_remove_ids?.length > 0
|
||||
i = @changes.length
|
||||
remove_change_id = {}
|
||||
for change_id in change_to_remove_ids
|
||||
remove_change_id[change_id] = true
|
||||
|
||||
while (i--)
|
||||
if remove_change_id[@changes[i].id]
|
||||
delete remove_change_id[@changes[i].id]
|
||||
removed_change = @changes.splice(i, 1)[0]
|
||||
@_markAsDirty removed_change, "change", "removed"
|
||||
if Object.keys(remove_change_id).length == 0
|
||||
break
|
||||
|
||||
validate: (text) ->
|
||||
for change in @changes
|
||||
if change.op.i?
|
||||
|
|
Loading…
Reference in a new issue