I have a note node that can be attached to another node. The note node serves as an annotation or comment that can be linked to the main node, providing additional information or context. The note node itself is made from a TextBlock, which allows for editable text content. The note node can be attached to the other nodes as a decorator, enabling users to visually connect notes to their corresponding nodes within the diagram.
The problem I am running into is textEdited isn’t being triggered when I click the tab key, so I added an event listener to my custom text editing tool. When tab is clicked, it updates the note’s text, which fixed my problem, but now when I successfully delete the note node (when the text block has an empty string), the note node “appears” to be there, layered on top of the attached node. Not until I click into the diagram does it go away. I think it’s happening because the text block is still in editing state, but when I try to do doDeactivate(), it does fixes my problem, but then the graph doesn’t respond to anything - can’t selected diagram, can’t click another node, etc. Would you agree it’s happening because the text block is still in editing state? Is there another way to get out of the editing state?
Once deleted:
After clicking into diagram (desired outcome):