mirror of
https://github.com/streamwall/streamwall.git
synced 2025-12-06 01:45:37 -05:00
Fix overlay under content view when existing view repositioned
This commit is contained in:
@@ -100,7 +100,16 @@ const viewStateMachine = setup({
|
||||
}
|
||||
|
||||
offscreenWin.contentView.removeChildView(view)
|
||||
win.contentView.addChildView(view, win.contentView.children.length - 1) // Insert below overlay but above background
|
||||
|
||||
const existingIdx = win.contentView.children.indexOf(view)
|
||||
win.contentView.addChildView(
|
||||
view,
|
||||
existingIdx !== -1
|
||||
? existingIdx
|
||||
: // Insert below the overlay (end of the current list because once added, the overlay's index will increase by 1)
|
||||
win.contentView.children.length - 1,
|
||||
)
|
||||
|
||||
view.setBounds(pos)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user