Skip to content

Commit

Permalink
fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BekhruzSNiyazov committed May 8, 2021
1 parent b171efb commit 87f22b9
Showing 1 changed file with 10 additions and 34 deletions.
44 changes: 10 additions & 34 deletions src/basicUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,6 @@ style.innerHTML = `*:not(h1, h2, h3, h4, h5, h6) {
padding: 0 12px 0 12px !important;
font-family: Garamond, "Apple Garamond";
}
footer {
position: relative;
bottom: 0;
width: 100vw;
padding: 4vh;
display: flex;
flex-direction: row;
justify-content: space-between;
}
footer span {
width: 25vw;
text-align: right;
}
footer span p {
text-align: left;
}
.center {
text-align: center;
}
.bar {
margin-left: 1vw;
margin-right: 1vw;
}
`;
document.head.appendChild(style);

Expand Down Expand Up @@ -152,15 +124,19 @@ class basicUIObject {
// this function wraps the element
wrap() {
let wrapper;
if (this.removed) {
wrapper = document.getElementById(this.hiddenId);
this.removed = false;
if (!this.wrapper) {
if (this.removed) {
wrapper = document.getElementById(this.hiddenId);
this.removed = false;
} else {
wrapper = document.createElement("span");
wrapper.id = this.hiddenId;
}
this.wrapper = wrapper;
} else {
wrapper = document.createElement("span");
wrapper.id = this.hiddenId;
wrapper = this.wrapper;
}
elements = [...elements, this];
this.wrapper = wrapper;
return wrapper;
}

Expand Down

0 comments on commit 87f22b9

Please sign in to comment.