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

Resing of an external label with text readjusting #4725

Open
DevAutomationInf opened this issue Nov 25, 2024 · 2 comments
Open

Resing of an external label with text readjusting #4725

DevAutomationInf opened this issue Nov 25, 2024 · 2 comments
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.

Comments

@DevAutomationInf
Copy link

DevAutomationInf commented Nov 25, 2024

Problem you would like to solve

It is not possible to resize the external text label of elements such as groups, start events, flows, etc., and readjust the text position when the label box is resized.

Proposed solution

When the external label of a group, start event, or flow is resized, the text should readjust according to the box size. It should behave like the label of a task element, for example.

Alternatives considered

I tried to achieve this by extending the RuleProvider and the BaseRenderer with no success. See https://stackblitz.com/~/github.com/DevAutomationInf/bpmn-angular?file=src/app/custom/custom-renderer.ts:L12-L62

Additional context

In this stackblitz example I am extending the RuleProvider to apply the resizing, but I see the following issue, the text doesn’t readjust based on the box size:
9ba26x

I tried to obtain the readjusting of text by extending the BaseRender without success ( see stackblitz). It seems like the text is readjusted according to the box but only when the box is moved and not when resized. That is because only in this case the drawShape is triggered. Also, when the drawShape method is called again, the text positioning is changed, making it impossible to predict the behavior.

readjust-text

@DevAutomationInf DevAutomationInf added the enhancement New feature or request label Nov 25, 2024
@barmac
Copy link
Collaborator

barmac commented Nov 25, 2024

Hi, thanks for opening the issue. Is this a proposal for a solution in Camunda Modeler, or a request for help with your integration? I can see "resizable labels" as a valid feature request, especially given that BPMN allows it.

@barmac barmac added the needs more information Requires additional information to be actionable. label Nov 25, 2024
@DevAutomationInf
Copy link
Author

Hi, barmac! Thank you for your quick reply. If it is possible to obtain this result by making the customization in my project, then help with my integration would be enough.
I already sent an email to [email protected] requesting this. I wanted to add a question here https://forum.bpmn.io/latest but I do not see the '+ New Topic' button in my account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.
Projects
None yet
Development

No branches or pull requests

2 participants