making dialog stay centered
This commit is contained in:
parent
40f8576c3a
commit
29c91de2fa
2 changed files with 13 additions and 2 deletions
|
@ -61,6 +61,11 @@ Dialog
|
|||
|
||||
.OxDialog {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -48px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
}
|
||||
|
|
|
@ -1252,8 +1252,8 @@ requires
|
|||
.options(options || {})
|
||||
.addClass("OxDialog")
|
||||
.css({
|
||||
left: (($document.width() - self.options.width) / 2) + "px",
|
||||
top: (($document.height() - self.options.height - 80) / 2) + "px",
|
||||
//left: (($document.width() - self.options.width) / 2) + "px",
|
||||
//top: (($document.height() - self.options.height - 80) / 2) + "px",
|
||||
width: self.options.width + "px",
|
||||
height: (self.options.height + 80) + "px"
|
||||
});
|
||||
|
@ -1316,6 +1316,9 @@ requires
|
|||
x = event.clientX,
|
||||
y = event.clientY;
|
||||
$window.mousemove(function(event) {
|
||||
that.css({
|
||||
margin: 0
|
||||
});
|
||||
$("*").css({
|
||||
WebkitUserSelect: "none"
|
||||
});
|
||||
|
@ -1350,6 +1353,9 @@ requires
|
|||
x = event.clientX,
|
||||
y = event.clientY;
|
||||
$window.mousemove(function(event) {
|
||||
that.css({
|
||||
margin: 0
|
||||
});
|
||||
var width = Ox.limit(
|
||||
elementWidth - x + event.clientX,
|
||||
self.options.minWidth, documentWidth
|
||||
|
|
Loading…
Reference in a new issue