Skip to content

Refactor node position so that x and y are no longer properties #427

Description

@prmr

In the design of diagram Node elements, the node's position is stored as a two node properties, x and y 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:

  1. The x and y properties are "special" because they should not be handled by the property sheet, thus requiring a whole mechanism to handle invisible properties.
  2. It means the 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.

Metadata

Metadata

Assignees

Labels

mainIssues with the main code baserefactoringA proposal to refector or generally improve the code

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions