sideview.js 파일 수정

This commit is contained in:
chicpro
2012-12-18 16:29:35 +09:00
parent 5cb3786891
commit d95e4acf4d

View File

@ -113,21 +113,25 @@ if (typeof(SIDEVIEW_JS) == 'undefined') // 한번만 실행
clickAreaCheck = true; clickAreaCheck = true;
var oSideViewLayer = document.getElementById(this.targetObj); var oSideViewLayer = document.getElementById(this.targetObj);
var oBody = document.body; var oBody = document.body;
var curObjParent = this.curObj.parentNode;
if (oSideViewLayer == null) { if (oSideViewLayer == null) {
oSideViewLayer = document.createElement("div"); oSideViewLayer = document.createElement("div");
oSideViewLayer.id = this.targetObj; oSideViewLayer.id = this.targetObj;
oSideViewLayer.style.position = "absolute"; oSideViewLayer.style.position = "absolute";
oBody.appendChild(oSideViewLayer); //oBody.appendChild(oSideViewLayer);
} }
curObjParent.appendChild(oSideViewLayer);
oSideViewLayer.innerHTML = this.makeNameContextMenus(); oSideViewLayer.innerHTML = this.makeNameContextMenus();
if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight) if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight + "px"; oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - getAbsoluteTop(this.curObj.offsetParent) - oSideViewLayer.scrollHeight + "px";
else else
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + "px"; oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - getAbsoluteTop(this.curObj.offsetParent) + this.curObj.offsetHeight + "px";
oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14 + "px"; oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - getAbsoluteLeft(this.curObj.offsetParent) - this.curObj.offsetWidth + 65 + "px";
divDisplay(this.targetObj, 'block'); divDisplay(this.targetObj, 'block');