Code for each button that opens a Modal/Drawer frame:
drawerFrame1.show() // 1, 2, 3 ...
let vFrames = visibleFrames.value // get visibleFrames array
vFrames.push("drawerFrame1") // add the last opened frame to the array
variable1.setValue(vFrames) // store the result to the variable
Code for each button that closes a Modal/Drawer frame:
drawerFrame1.hide() // 1, 2, 3 ...
let vFrames = visibleFrames.value // get visibleFrames array
vFrames.pop() // pop the last opened frame from the array
variable1.setValue(vFrames)) // store the result to the variable
Code for each Modal/Drawer frame's Show overlay option:
// if visibleFrames last item is the modal/drawer frame itself, show its overlay
{{ visibleFrames.value[visibleFrames.value.length-1] == self.id }}