Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions js/piemenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -3658,14 +3658,27 @@ const piemenuGrid = (activity) => {
activity.turtles._exitWheel.createWheel(["×", " "]);

activity.turtles._exitWheel.navItems[0].navigateFunction = () => {
docById("wheelDivptm").style.display = "none";
activity.turtles.gridWheel.removeWheel();
activity.turtles._exitWheel.removeWheel();
hidePiemenu(activity);
};

if (docById("helpfulWheelDiv").style.display !== "none") {
docById("helpfulWheelDiv").style.display = "none";
}

const hidePiemenu = (activity) => {
docById("wheelDivptm").style.display = "none";
activity.turtles.gridWheel.removeWheel();
activity.turtles._exitWheel.removeWheel();
};
const clickOutsideHandler = (event) => {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a new line between these definitions (hidePiemenu and clickOutsideHandler) and please remove the extra space of indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sir I did the change ..Is it okay or something else to do

const piemenu = docById("wheelDivptm");
if (!piemenu.contains(event.target)) {
hidePiemenu(activity);
document.removeEventListener("mousedown", clickOutsideHandler);
}
};

document.addEventListener("mousedown", clickOutsideHandler);
};

const piemenuKey = (activity) => {
Expand Down Expand Up @@ -4000,4 +4013,4 @@ const piemenuKey = (activity) => {
if (j !== -1) {
modenameWheel.navigateWheel(j);
}
};
};