mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
smoother transitions
This commit is contained in:
@@ -26,15 +26,16 @@ class Modal
|
||||
$(document).bind 'keydown.modal', (e) =>
|
||||
if e.keyCode is (esc = 27) then @hide(); false
|
||||
|
||||
$('#modal-overlay')
|
||||
.css('opacity', 0.2)
|
||||
.fadeIn(200)
|
||||
.click => @hide()
|
||||
|
||||
$('body').append $(@template).hide()
|
||||
$('#modal .content').append @html
|
||||
$('#modal').fadeIn 200
|
||||
@resize()
|
||||
|
||||
$('#modal-overlay')
|
||||
.css('opacity', 0.2)
|
||||
.click(=> @hide())
|
||||
.fadeIn 200, =>
|
||||
$('#modal').fadeIn(200)
|
||||
$('#modal input').focus()
|
||||
@resize()
|
||||
|
||||
Event.trigger 'modal:show', @
|
||||
|
||||
@@ -45,7 +46,7 @@ class Modal
|
||||
|
||||
hide: ->
|
||||
@showing = false
|
||||
$('#modal').fadeOut -> $(this).remove()
|
||||
$('#modal').remove()
|
||||
$('#modal-overlay').fadeOut 200, -> $(this).remove()
|
||||
$(document).unbind '.modal'
|
||||
$(window).unbind '.modal'
|
||||
|
||||
Reference in New Issue
Block a user