1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00
Files
DankMaterialShell/Modules/ControlCenter/utils/state.js

25 lines
600 B
JavaScript

function setTriggerPosition(root, x, y, width, section, screen) {
root.triggerX = x
root.triggerY = y
root.triggerWidth = width
root.triggerSection = section
root.triggerScreen = screen
}
function openWithSection(root, section) {
if (root.shouldBeVisible) {
root.close()
} else {
root.expandedSection = section
root.open()
}
}
function toggleSection(root, section) {
if (root.expandedSection === section) {
root.expandedSection = ""
root.expandedWidgetIndex = -1
} else {
root.expandedSection = section
}
}