This commit is contained in:
Liang Ding 2014-12-23 11:50:17 +08:00
commit 4ba5c4925d
1 changed files with 6 additions and 5 deletions

View File

@ -35,24 +35,25 @@ var bottomGroup = {
}); });
}, },
_initFrame: function () { _initFrame: function () {
$(".bottom-window-group .output").mousedown(function (event) { $(".bottom-window-group .output").parent().mousedown(function (event) {
event.stopPropagation(); event.stopPropagation();
if (event.button === 0) { // 左键 if (event.button === 0) { // 左键
$(".bottom-window-group .frame").hide(); $(".bottom-window-group .frame").hide();
return false; return;
} }
// event.button === 2 右键 // event.button === 2 右键
var left = event.screenX; var left = event.screenX,
$it = $(this);
if ($(".side").css("left") === "auto" || $(".side").css("left") === "0px") { if ($(".side").css("left") === "auto" || $(".side").css("left") === "0px") {
left = event.screenX - $(".side").width(); left = event.screenX - $(".side").width();
} }
$(".bottom-window-group .frame").show().css({ $(".bottom-window-group .frame").show().css({
"left": left + "px", "left": left + "px",
"top": (event.offsetY + 20) + "px" "top": (event.offsetY + event.target.offsetTop - $it.scrollTop() - 10) + "px"
}); });
return false; return;
}); });
}, },
clear: function (id) { clear: function (id) {