Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
set temp timeout
show same box with different timeouts
  • Loading branch information
Mehmet Aydemir committed Mar 1, 2016
1 parent ab03fea commit 85032c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions leaflet-messagebox.js
Expand Up @@ -10,12 +10,13 @@ L.Control.Messagebox = L.Control.extend({
return this._container;
},

show: function (message) {
show: function (message, timeout) {
var elem = this._container;
elem.innerHTML = message;
elem.style.display = 'block';

var timeout = this.options.timeout;
timeout = timeout || this.options.timeout;

if (typeof this.timeoutID == 'number') {
clearTimeout(this.timeoutID);
}
Expand Down

0 comments on commit 85032c9

Please sign in to comment.