From be37c1aee938b64b8b03060a723bd97df5b67c73 Mon Sep 17 00:00:00 2001 From: yobdoy Date: Wed, 26 Jul 2017 00:32:43 -0500 Subject: [PATCH] Correct newest_on_top and add width property line 274 was set as === true, if newest_on_top is true, notifications should overlap on top of each other, current file contradicts with line 252 Also proposing to specify width so we can make this as bar notifications of 100% width if desired --- bootstrap-notify.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap-notify.js b/bootstrap-notify.js index d97e4c0..be4aedd 100644 --- a/bootstrap-notify.js +++ b/bootstrap-notify.js @@ -35,6 +35,7 @@ }, offset: 20, spacing: 10, + width: '200px', z_index: 1031, delay: 5000, timer: 1000, @@ -241,7 +242,8 @@ margin: '0px auto', position: this.settings.position ? this.settings.position : (this.settings.element === 'body' ? 'fixed' : 'absolute'), transition: 'all .5s ease-in-out', - zIndex: this.settings.z_index + zIndex: this.settings.z_index, + width: this.settings.width }, hasAnimation = false, settings = this.settings; @@ -271,7 +273,7 @@ $(this.settings.element).append(this.$ele); - if (this.settings.newest_on_top === true) { + if (this.settings.newest_on_top !== true) { //this was set as === true, if newest_on_top is true, notifications should overlap on top of each other, contradicting with line 252 offsetAmt = (parseInt(offsetAmt) + parseInt(this.settings.spacing)) + this.$ele.outerHeight(); this.reposition(offsetAmt); }