EasyUI Forum
April 20, 2024, 02:49:05 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Out of bounds when the desktop window moves  (Read 4643 times)
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« on: July 04, 2018, 02:06:54 AM »

Code:
onMove: function(left,top){
var opt = $(this).window('options');
app.left = opt.left;
app.top = opt.top;
if (left < 0) {
$(this).window('move', {
left : 1
});
}
if (top < 0) {
$(this).window('move', {
top : 1
});
}
var width = parseInt($(this).parent().css('width'));
var height = parseInt($(this).parent().css('height'));
var parentWidth = $(window).width();
var parentHeight = $(window).height();


if (left > parentWidth - width) {
$(this).window('move', {
"left" : parentWidth - width
});
}
if (top > parentHeight - height) {
$(this).window('move', {
"top" : parentHeight - 45 - height
});
}
}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!