makaip / mathematix

A nodeblock-based math webapp.
https://makaip.github.io/mathematix/
GNU General Public License v3.0
4 stars 0 forks source link

Nodule connections remain after node block is deleted #3

Closed makaip closed 7 months ago

makaip commented 8 months ago

When connecting two node blocks, the connections update, causing a line to be drawn between the two nodules. image Upon deleting the connected nodule, however, the line is still connected to where the nodule would have been. This is most possibly due to the fact that the nodule objects are still contained within the object it is connected to, despite the fact that the parent object (the node) has been deleted. image However, the contents of the object are not modified, even when the screen is updated, allowing the user to drag around a node block connected to a nonexistent nodule. image

Valenciola commented 8 months ago

On top of this, you are able to drag out into the editor without connecting to anything and the line will remain.

Valenciola commented 8 months ago

I'm not sure if this is relevant to the problem but you are unable to connect a value node to two output nodes (the line is erased); maybe seeing where this happens can help solve the problem with what happens when the user presses any of the deletion buttons.

AlexanderJCS commented 8 months ago

As-is, that's intentional. Otherwise there's really no way to change where the connection connects to.

In the future, it would be nice if we could connect an input node to multiple outputs. You could disconnect by re-connecting to the same output.

This should go in its own issue.

AlexanderJCS commented 7 months ago

Made a PR. Still needs a code review @makaip