mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Add is destroyed flag to decoration
This commit is contained in:
@@ -18,12 +18,16 @@ class Decoration
|
||||
@id = nextId()
|
||||
@params.id = @id
|
||||
@flashQueue = null
|
||||
@isDestroyed = false
|
||||
|
||||
destroy: ->
|
||||
return if @isDestroyed
|
||||
@isDestroyed = true
|
||||
@displayBuffer.removeDecoration(this)
|
||||
@emit 'destoryed'
|
||||
|
||||
update: (newParams) ->
|
||||
return if @isDestroyed
|
||||
oldParams = @params
|
||||
@params = newParams
|
||||
@params.id = @id
|
||||
|
||||
Reference in New Issue
Block a user