Some more minor tweeks to blueui window class, and more tweeks to index and css

This commit is contained in:
bluesaxman
2022-04-07 19:51:27 -06:00
parent 40b4ae07a6
commit f25979eff1
3 changed files with 33 additions and 7 deletions

View File

@@ -82,8 +82,8 @@ function makeResizeable (targetNode, handleNode) {
function initResize(e) {
startX = e.clientX;
startY = e.clientY;
startWidth = parseInt(document.defaultView.getComputedStyle(target).width, 10);
startHeight = parseInt(document.defaultView.getComputedStyle(target).height, 10);
startWidth = parseInt(document.defaultView.getComputedStyle(targetNode).width, 10);
startHeight = parseInt(document.defaultView.getComputedStyle(targetNode).height, 10);
document.documentElement.addEventListener('mousemove', doResize, false);
document.documentElement.addEventListener('mouseup', stopResize, false);
}
@@ -133,6 +133,8 @@ class buiWindow {
this.main.setAttribute("class","bui_window_main");
this.content = document.createElement("div");
this.content.setAttribute("class","bui_window_content");
this.content.style.height = height+"px";
this.content.style.width = width+"px";
this.main.appendChild(this.content);
sizeable = "boolean" == typeof sizeable ? sizeable : true;
if (sizeable) {
@@ -142,7 +144,7 @@ class buiWindow {
this.main.appendChild(this.resizeHandle);
}
this.root.appendChild(this.titlebar);
this.root.appendChild(this.content);
this.root.appendChild(this.main);
}
minimize () {