You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the GateView and the gate's functionality currently seems to be defined once during initialization, I assume there is no way to change the number of (input or output) bits of some gate afterwards. Is that correct?
If so, do you have some idea where and how this functionality could be added? I would like to look into it, as we would like to use your library with this possibility.
The text was updated successfully, but these errors were encountered:
Changing the gate's input/output characteristics is currently not possible, as it risks leaving the circuit in some weird, inconsistent state, and breaking the simulation.
Backbone.js, the library used by JointJS and DigitalJS for representing graphs, allows to listen to changes of model attributes. If I was adding a feature like this, I would add listeners to relevant attributes, which would respond by fixing up the graph so that it is still consistent after the change. If changing the number of bits, this would probably require disconnecting every connection to the changed input/output. (Another possibility would be to allow the invalid connection, but have the simulation detect it and display the problem in the UI in some way.) One would also need to ensure that the view gets re-rendered.
As this is a functionality which seems bug-prone, tests would need to be added to verify correctness.
As the GateView and the gate's functionality currently seems to be defined once during initialization, I assume there is no way to change the number of (input or output) bits of some gate afterwards. Is that correct?
If so, do you have some idea where and how this functionality could be added? I would like to look into it, as we would like to use your library with this possibility.
The text was updated successfully, but these errors were encountered: