keep dialog from being resizable beyond document
This commit is contained in:
parent
4eb9898216
commit
5e10355c1a
|
@ -62,7 +62,7 @@ Dialog
|
|||
.OxDialog {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -48px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
|
|
|
@ -1254,6 +1254,7 @@ requires
|
|||
.css({
|
||||
//left: (($document.width() - self.options.width) / 2) + "px",
|
||||
//top: (($document.height() - self.options.height - 80) / 2) + "px",
|
||||
top: parseInt(-$document.height() / 10) + "px",
|
||||
width: self.options.width + "px",
|
||||
height: self.options.height + "px"
|
||||
});
|
||||
|
@ -1316,12 +1317,12 @@ requires
|
|||
x = event.clientX,
|
||||
y = event.clientY;
|
||||
$window.mousemove(function(event) {
|
||||
that.css({
|
||||
margin: 0
|
||||
});
|
||||
$("*").css({
|
||||
WebkitUserSelect: "none"
|
||||
});
|
||||
that.css({
|
||||
margin: 0
|
||||
});
|
||||
var left = Ox.limit(
|
||||
offset.left - x + event.clientX,
|
||||
24 - self.options.width, documentWidth - 24
|
||||
|
@ -1354,6 +1355,9 @@ requires
|
|||
x = event.clientX,
|
||||
y = event.clientY;
|
||||
$window.mousemove(function(event) {
|
||||
$("*").css({
|
||||
WebkitUserSelect: "none"
|
||||
});
|
||||
that.css({
|
||||
left: offset.left,
|
||||
top: offset.top,
|
||||
|
@ -1361,11 +1365,11 @@ requires
|
|||
});
|
||||
var width = Ox.limit(
|
||||
elementWidth - x + event.clientX,
|
||||
self.options.minWidth, documentWidth
|
||||
self.options.minWidth, documentWidth - offset.left
|
||||
),
|
||||
height = Ox.limit(
|
||||
elementHeight - y + event.clientY,
|
||||
self.options.minHeight, documentHeight
|
||||
self.options.minHeight, documentHeight - offset.top
|
||||
);
|
||||
that.width(width);
|
||||
that.height(height);
|
||||
|
@ -1373,6 +1377,9 @@ requires
|
|||
});
|
||||
$window.one("mouseup", function() {
|
||||
$window.unbind("mousemove");
|
||||
$("*").css({
|
||||
WebkitUserSelect: "auto"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user