I feel like I might have it?

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-16 22:41:33 -07:00
parent cefd44f67a
commit 8c2d8054a1

View File

@ -21,6 +21,8 @@
<style>
rect {
fill: inherit;
stroke: black;
stroke-width: 0.25px;
}
g use {
fill: gray;
@ -40,7 +42,7 @@
/*}*/
g#out circle {
fill: orange;
/*transform: scale(3);*/
transform: scale(3);
}
</style>
<g
@ -1586,7 +1588,7 @@
[...out.children].forEach(child => {
console.log('child', child, 'belongs to', store.get(child));
console.log('relatedTarget', e.relatedTarget);
if (store.get(child) !== g || !e.relatedTarget) {
if (!e.relatedTarget || store.get(child) !== g || e.relatedTarget !== child) {
console.log('returning to', store.get(child));
store.get(child).append(child);
store.delete(child);

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB