Skip to content

Instantly share code, notes, and snippets.

@validkeys
Created August 30, 2013 15:22
Show Gist options
  • Select an option

  • Save validkeys/6390974 to your computer and use it in GitHub Desktop.

Select an option

Save validkeys/6390974 to your computer and use it in GitHub Desktop.
class CustomRegion.NotificationRegion extends Marionette.Region
constructor: ->
Marionette.Region.prototype.constructor.apply(@, arguments)
@ensureEl()
@$el.on "hidden", {region: @}, (event) ->
event.data.region.close()
currentStatus: "closed"
closed: ->
@$el.transition
x: "-100%"
, =>
@currentStatus = "closed"
popout: ->
@$el.transition
x: "10%"
, =>
@currentStatus = "poppedout"
expand: ->
@$el.transition
x: "110%"
, =>
@currentStatus = "expanded"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment