(e)
| 4470 | }; |
| 4471 | |
| 4472 | var moveAction = function (e) { |
| 4473 | e = e || window.event; //IE |
| 4474 | |
| 4475 | var left, top, nowLeft = parseInt(dialog[0].style.left), nowTop = parseInt(dialog[0].style.top); |
| 4476 | |
| 4477 | if( nowLeft >= 0 ) { |
| 4478 | if( nowLeft + dialog.width() <= $(window).width()) { |
| 4479 | left = e.clientX - posX; |
| 4480 | } else { |
| 4481 | left = $(window).width() - dialog.width(); |
| 4482 | document.onmousemove = null; |
| 4483 | } |
| 4484 | } else { |
| 4485 | left = 0; |
| 4486 | document.onmousemove = null; |
| 4487 | } |
| 4488 | |
| 4489 | if( nowTop >= 0 ) { |
| 4490 | top = e.clientY - posY; |
| 4491 | } else { |
| 4492 | top = 0; |
| 4493 | document.onmousemove = null; |
| 4494 | } |
| 4495 | |
| 4496 | |
| 4497 | document.onselectstart = function() { |
| 4498 | return false; |
| 4499 | }; |
| 4500 | |
| 4501 | userUnselect($("body")); |
| 4502 | userUnselect(dialog); |
| 4503 | dialog[0].style.left = left + "px"; |
| 4504 | dialog[0].style.top = top + "px"; |
| 4505 | }; |
| 4506 | |
| 4507 | document.onmouseup = function() { |
| 4508 | userCanSelect($("body")); |
nothing calls this directly
no test coverage detected