fixed a couple issues with window object references
This commit is contained in:
parent
5f7df39d9e
commit
c24e6029ce
@ -120,11 +120,11 @@ class buiWindow {
|
||||
this.controls = document.createElement("span");
|
||||
this.controls.setAttribute("class","bui_window_controls");
|
||||
if (min) {
|
||||
this.minimizeButton = new buiButton("_",this.minimize);
|
||||
this.minimizeButton = new buiButton("_",() => { this.minimize() });
|
||||
this.controls.appendChild(this.minimizeButton.root);
|
||||
}
|
||||
if (close) {
|
||||
this.closeButton = new buiButton("X",this.close);
|
||||
this.closeButton = new buiButton("X",() => { this.close(); });
|
||||
this.controls.appendChild(this.closeButton.root)
|
||||
}
|
||||
this.titlebar.appendChild(this.controls);
|
||||
@ -146,9 +146,13 @@ class buiWindow {
|
||||
}
|
||||
|
||||
minimize () {
|
||||
var current = this.content.style.display == "none" ? "revert" : "none";
|
||||
this.content.style.display = current;
|
||||
}
|
||||
|
||||
close () {
|
||||
this.root.remove();
|
||||
// this = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user