Revert "Make a nice top/bottom center global position"

This commit is contained in:
Jaime Pillora
2016-06-09 03:58:15 +10:00
parent 8ba7204c0d
commit 64dda76979
2 changed files with 2 additions and 24 deletions
+2 -17
View File
@@ -338,19 +338,6 @@
return elems[fn].apply(elems, args);
};
Notification.prototype.setGlobalNoticePosition = function(align) {
this.wrapper.css({visibility: 'hidden', display: 'block', float: 'left'});
this.container.css({visibility: 'hidden', display: 'block'});
if (align === 'center') {
var css = {};
css.clear = 'both';
css.marginLeft = 0 - this.wrapper.width() / 2 + 'px';
this.wrapper.css(css);
}
this.wrapper.css({visibility: ''});
this.container.css({visibility: '', display: 'none'});
};
Notification.prototype.setGlobalPosition = function() {
var p = this.getPosition();
var pMain = p[0];
@@ -366,16 +353,14 @@
if (align === "middle") {
css.top = '45%';
} else if (align === "center") {
css.left = '50%';
css.left = '45%';
} else {
css[align] = 0;
}
anchor.css(css).addClass(pluginClassName + "-corner");
$("body").append(anchor);
}
var elem = anchor.prepend(this.wrapper);
this.setGlobalNoticePosition(align);
return elem;
return anchor.prepend(this.wrapper);
};
Notification.prototype.setElementPosition = function() {
-7
View File
@@ -36,13 +36,6 @@
});
});
$.notify('Line text 1', {position: 'top center'});
$.notify('Line text 01', {position: 'top center'});
$.notify('Line text 001', {position: 'top center'});
$.notify('Line text 1', {position: 'bottom center'});
$.notify('Line text 01', {position: 'bottom center'});
$.notify('Line text 001', {position: 'bottom center'});
</script>
</body>