Skip to content

Commit

Permalink
🐛 Nothing prevented the color-picker opening after having been dest…
Browse files Browse the repository at this point in the history
…royed

This might fix #168, #167, #161, #154, #153, #142 and #114
  • Loading branch information
thomaslindstrom committed Jan 27, 2016
1 parent 78f6114 commit a0a3c43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/ColorPicker-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
# Destroy the view and unbind events
# -------------------------------------
destroy: ->
@canOpen = no
@emitBeforeDestroy()

for [_event, _listener] in @listeners
Expand Down
8 changes: 5 additions & 3 deletions lib/ColorPicker.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# ----------------------------------------------------------------------------

module.exports =
view: (require './ColorPicker-view')()

activate: ->
_command = 'color-picker:open'

Expand Down Expand Up @@ -44,7 +46,9 @@

return @view.activate()

deactivate: -> @view?.destroy()
deactivate: ->
@view?.destroy()
@view = null

provideColorPicker: ->
return {
Expand Down Expand Up @@ -95,5 +99,3 @@
type: 'string'
enum: ['C', 'E', 'H', 'K']
default: 'C'

view: (require './ColorPicker-view')()

0 comments on commit a0a3c43

Please sign in to comment.