Refactor node position so that x and y are no longer properties #427
Labels
main
Issues with the main code base
refactoring
A proposal to refector or generally improve the code
Milestone
In the design of diagram
Node
elements, the node's position is stored as a two node properties,x
andy
respectively. This has the advantage of simplifying the encoding and decoding of diagrams, since position values get serialized like all other node attributes. However, this insignificant advantage comes at a great cost:x
andy
properties are "special" because they should not be handled by the property sheet, thus requiring a whole mechanism to handle invisible properties.Point
class cannot be immutable (as it should), because properties have to be mutable.We can greatly simplify the design of the code by not storing a node's position using properties.
The text was updated successfully, but these errors were encountered: