Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeStyleDescription can only express square shapes #1559

Closed
pcdavid opened this issue Jan 9, 2023 · 0 comments · Fixed by #1561
Closed

NodeStyleDescription can only express square shapes #1559

pcdavid opened this issue Jan 9, 2023 · 0 comments · Fixed by #1561

Comments

@pcdavid
Copy link
Member

pcdavid commented Jan 9, 2023

It should be possible to specify the width and height of nodes separately.
Currently we have a single expression which is expected to return a single number that is used for both dimensions: size = Size.of(computedSize, computedSize)

Options:

  1. replace sizeComputationExpression with separate widthComputationExpression and heightComputationExpression: simple to understand and implement, makes it possible to specify one dimension of not the other, but breaks existing diagram modeles and adds yet more elements in an already crowded details view.
  2. allow sizeComputationExpression to return full-blown Size objects, either as a string representation (aql:'150,' + self.computedHeight()) or with a new globally acessible service: aql:self.makeSize(150, self.computedHeight()). Feels cleaner but more costly to implement and brittle in the case of a string-based representation (need to define the syntax, to parse it properly).
@pcdavid pcdavid added this to the 2023.3.0 milestone Jan 9, 2023
@pcdavid pcdavid self-assigned this Jan 9, 2023
@pcdavid pcdavid changed the title NodeStyleDescription.sizeComputationExpression can only express square shapes NodeStyleDescription can only express square shapes Jan 9, 2023
pcdavid added a commit that referenced this issue Jan 9, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Jan 10, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid linked a pull request Jan 10, 2023 that will close this issue
39 tasks
pcdavid added a commit that referenced this issue Jan 10, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Jan 11, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Jan 11, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
sbegaudeau pushed a commit that referenced this issue Jan 11, 2023
Bug: #1559
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant