ui: cleaning unassigned slots

This commit is contained in:
nick-delirium 2025-06-06 10:15:07 +02:00
parent 8603439716
commit 9f4852bd38
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 1 additions and 2 deletions

View file

@ -297,6 +297,7 @@ export default class DOMManager extends ListWalker<Message> {
if (vChild.node.parentNode === (host as any).node) {
host.node.removeChild(vChild.node);
}
(host as any).notMontedChildren?.delete(vChild);
slotElem.addAssigned(vChild);
(vChild as any).assignedSlot = slotElem;
this.nodeSlots.set(msg.id, { slotID: msg.slotID, host });

View file

@ -595,7 +595,6 @@ export default abstract class Observer {
}
if (slot) {
const slotID = this.app.nodes.getID(slot)
console.log('Openreplay: slotID', slotID, 'for node', id, node, 'slot', slot)
if (slotID !== undefined) {
this.slotMap.set(id, slotID)
this.app.send(SetNodeSlot(id, slotID))
@ -605,7 +604,6 @@ export default abstract class Observer {
}
if (recentsType === RecentsType.Removed && parentID !== undefined) {
this.app.send(MoveNode(id, parentID, index))
console.log('RM Openreplay', id, node, 'slot', slot)
if (slot) {
const slotID = this.app.nodes.getID(slot)
if (slotID !== undefined && this.slotMap.get(id) !== slotID) {