Skip to content

Commit

Permalink
Fixed panel issue when changing the file tab position #41
Browse files Browse the repository at this point in the history
  • Loading branch information
bajrangCoder committed Dec 15, 2023
1 parent a740736 commit 7f6a7f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,8 @@ class AcodeX {
newY;
let buttonLeft = this.$showTermBtn.offsetLeft - newX;
let totalHeaderHeight =
document.querySelector("#root header").offsetHeight +
document.querySelector("#root ul").offsetHeight;
document.querySelector("#root header")?.offsetHeight || 0 +
document.querySelector("#root ul")?.offsetHeight || 0;
let maxX = window.innerWidth - this.$showTermBtn.offsetWidth;
let maxY =
window.innerHeight -
Expand Down Expand Up @@ -1047,10 +1047,10 @@ class AcodeX {
let newHeight = this.startHeight - diffY;

const totalHeaderHeight =
document.querySelector("#root header").offsetHeight +
document.querySelector("#root ul").offsetHeight;
document.querySelector("#root header")?.offsetHeight || 0 +
document.querySelector("#root ul")?.offsetHeight || 0;
const totalFooterHeight =
document.querySelector("#quick-tools").offsetHeight;
document.querySelector("#quick-tools")?.offsetHeight || 0;
const maximumHeight =
window.innerHeight - (totalHeaderHeight + totalFooterHeight);
const minimumHeight = 100;
Expand Down

0 comments on commit 7f6a7f1

Please sign in to comment.