mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Update range tracker with new bulk method.
This commit is contained in:
parent
9d2bdcf8da
commit
a3c529d23f
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