Skip to content

Commit

Permalink
added new param: timeoutAfterMove : bool. Adds additional timeout aft…
Browse files Browse the repository at this point in the history
…er user action before closing
  • Loading branch information
Alex Hortopan committed May 26, 2013
1 parent 34f5f11 commit f3b35ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion humane.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
this.timeout = 'timeout' in o ? o.timeout : 2500
this.waitForMove = o.waitForMove || false
this.clickToClose = o.clickToClose || false
this.timeoutAfterMove = o.timeoutAfterMove || false
this.container = o.container

try { this._setupEl() } // attempt to setup elements
Expand All @@ -71,7 +72,7 @@
}
this.container.appendChild(el)
this.el = el
this.removeEvent = ENV.bind(this.remove,this)
this.removeEvent = ENV.bind(function(){ if (!this.timeoutAfterMove){this.remove()} else {setTimeout(ENV.bind(this.remove,this),this.timeout);}},this)
this.transEvent = ENV.bind(this._afterAnimation,this)
this._run()
},
Expand Down
2 changes: 1 addition & 1 deletion humane.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f3b35ed

Please sign in to comment.