Skip to content

Commit

Permalink
risolto bug, dragSelector supra StartContainer...
Browse files Browse the repository at this point in the history
  • Loading branch information
Laaouatni committed Jan 1, 2022
1 parent 9c9928a commit 3f38595
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 197,28 @@ function openOneWinCloseOther() {
}

/* new code in beta */
function dragSelector() {
function dragSelectorLogic() {

document.addEventListener("mousedown", function(e1) {

if (windowsTab.style.display == "grid") {
console.log("yessss risolto il bug!!!")
} else {
if (e1.target.closest("#w11-start-section") != startContainer && startContainer.classList.contains("on-visible-start")) {
startContainer.classList.toggle("on-visible-start");
dragSelectorCode();
} else if (e1.target.closest("#widget-section") != widgetContainer && widgetContainer.classList.contains("on-visible-widget")) {
widgetContainer.classList.toggle("on-visible-widget");
dragSelectorCode();
} else if (e1.target.closest("#notification-section") != notifContainer && notifContainer.classList.contains("notification-on")) {
notifContainer.classList.toggle("notification-on");
dragSelectorCode();
} else {
dragSelectorCode();
}
}

function dragSelectorCode() {
div.style.display = "block";

div.style.width = 0 "px";
Expand Down Expand Up @@ -249,4 265,4 @@ function dragSelector() {
});
}

dragSelector();
dragSelectorLogic();

1 comment on commit 3f38595

@vercel
Copy link

@vercel vercel bot commented on 3f38595 Jan 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.