Skip to content

Commit 21f7bbc

Browse files
committed
fix default notification positioning
resolves
1 parent c468247 commit 21f7bbc

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

js/angular/components/notification/notification.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
return directive;
8787

8888
function link(scope, element, attrs, controller) {
89-
scope.position = scope.position ? scope.position.split(' ').join('-') : 'top-right';
89+
scope.position = scope.position ? scope.position.split(' ').join('-') : 'default-position';
9090

9191
scope.$on("$destroy", function() {
9292
BaseAppsApi.unsubscribe(attrs.id);
@@ -242,7 +242,7 @@
242242
}
243243

244244
function postLink(scope, element, attrs, controller) {
245-
scope.position = attrs.position ? attrs.position.split(' ').join('-') : 'top-right';
245+
scope.position = attrs.position ? attrs.position.split(' ').join('-') : 'default-position';
246246

247247
var animationIn = attrs.animationIn || 'fadeIn';
248248
var animationOut = attrs.animationOut || 'fadeOut';

scss/components/_notification.scss

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,14 @@ $notification-icon-align: top !default;
183183

184184
position: fixed !important;
185185

186-
&.top-right { @include notification-layout(right, top); }
187-
&.top-left { @include notification-layout(left, top); }
188-
&.top-middle { @include notification-layout(middle, top); }
186+
&.default-position { @include notification-layout(); }
187+
&.top-right { @include notification-layout(right, top); }
188+
&.top-left { @include notification-layout(left, top); }
189+
&.top-middle { @include notification-layout(middle, top); }
189190

190-
&.bottom-right { @include notification-layout(right, bottom); }
191-
&.bottom-left { @include notification-layout(left, bottom); }
192-
&.bottom-middle { @include notification-layout(middle, bottom); }
191+
&.bottom-right { @include notification-layout(right, bottom); }
192+
&.bottom-left { @include notification-layout(left, bottom); }
193+
&.bottom-middle { @include notification-layout(middle, bottom); }
193194

194195
&.success { @include notification-style($success-color) }
195196
&.warning { @include notification-style($warning-color) }
@@ -200,13 +201,14 @@ $notification-icon-align: top !default;
200201
.notification-container {
201202
@include notification-container;
202203

203-
&.top-right { @include notification-layout(right, top); }
204-
&.top-left { @include notification-layout(left, top); }
205-
&.top-middle { @include notification-layout(middle, top); }
204+
&.default-position { @include notification-layout(); }
205+
&.top-right { @include notification-layout(right, top); }
206+
&.top-left { @include notification-layout(left, top); }
207+
&.top-middle { @include notification-layout(middle, top); }
206208

207-
&.bottom-right { @include notification-layout(right, bottom); }
208-
&.bottom-left { @include notification-layout(left, bottom); }
209-
&.bottom-middle { @include notification-layout(middle, bottom); }
209+
&.bottom-right { @include notification-layout(right, bottom); }
210+
&.bottom-left { @include notification-layout(left, bottom); }
211+
&.bottom-middle { @include notification-layout(middle, bottom); }
210212
}
211213

212214
.notification-icon {

0 commit comments

Comments
 (0)