fixed width-adjustment bug when dragging

This commit is contained in:
加里 2014-08-28 11:36:19 +08:00
parent 6c62b162f2
commit 6b6708ee29
3 changed files with 4 additions and 5 deletions

View File

@ -99,9 +99,9 @@
.recordDetailOverlay{ .recordDetailOverlay{
z-index: 1; z-index: 1;
width: 61.8%;
height: 100%; height: 100%;
position: fixed; position: fixed;
left: 35%;
right: 0; right: 0;
background: #FFF; background: #FFF;
border-left: 1px solid #CCC; border-left: 1px solid #CCC;

View File

@ -8,7 +8,7 @@
<body> <body>
<div class="topHead"> <div class="topHead">
<h1>Anyproxy</h1> <h1>Anyproxy</h1>
<a href="#" class="J_clearBtn"><span class="topBtn">Clear Logs(Command/Ctrl+X)</span></a> <a href="#" class="J_clearBtn"><span class="topBtn">Clear Logs(Ctrl+X)</span></a>
</div> </div>
<div class="mainTableWrapper J_mainTable"> <div class="mainTableWrapper J_mainTable">

View File

@ -144,7 +144,7 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
}); });
$(document).on("keyup",function(e){ $(document).on("keyup",function(e){
if(e.keyCode == 88 && e.ctrlKey){ //ctrl x if(e.keyCode == 88 && e.ctrlKey){ // ctrl + x
clearLogs(); clearLogs();
}else{ }else{
console.log("key up"); console.log("key up");
@ -204,7 +204,6 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
if (dragging) { if (dragging) {
var deltaPageX = e.pageX - pageX; var deltaPageX = e.pageX - pageX;
$('.J_recordDetailOverlay').css("width",$('.J_recordDetailOverlay').width() - deltaPageX);
$('.J_recordDetailOverlay').css("left",pageX + deltaPageX); $('.J_recordDetailOverlay').css("left",pageX + deltaPageX);
if($('.J_recordDetailOverlay').width()<=100){ if($('.J_recordDetailOverlay').width()<=100){
$('.J_recordDetailOverlay').animate({ $('.J_recordDetailOverlay').animate({