/* Control window cannot drag out main window (overwrite) */
var easyuipanelonmove = function (left, top) {
if ($ (this). Panel (' Options '). resizing) return;
var parentobj = $ (this). Panel (' Panel '). parent ();
var width = $ (this). Panel (' Options '). width;
var height = $ (this). Panel (' Options '). Height;
if (left < 0) {$ (this). Panel (' move ', {left:0});
if (Top < 0) {$ (this). Panel (' move ', {top:0});
if (Parentobj.css ("overflow") = = "hidden") {
var inline = $.data (this, "window"). Options.inline;
if (inline = = False) {Parentobj = $ (window);}
if (Left > Parentobj.width ()-width) {$ (the). Panel (' move ', {"Left": Parentobj.width ()-width});}
if (Top > Parentobj.height ()-height) {$ (this). Panel (' move ', {"Top": parentobj.height ()-height});}
}
};
$.fn.window.defaults.onmove = Easyuipanelonmove;
$.fn.dialog.defaults.onmove = Easyuipanelonmove;
The control window cannot be dragged out of the main window Dialog and window