bpmn-io / bpmn-js

A BPMN 2.0 rendering toolkit and web modeler.
https://bpmn.io/toolkit/bpmn-js/
Other
8.63k stars 1.33k forks source link

Add modifier for space tool to restrict adding space only to the current participant #557

Closed vkatushenok closed 1 year ago

vkatushenok commented 8 years ago

On the screenshot below, would like to add space to the right of the cursor but only for the bottom participant. screen shot 2016-05-25 at 09 19 01

Tasks

nikku commented 6 years ago

Interaction Demo

foo

Notes

This does not provide a preview to the user yet, whether the local or global space tool is being used.

nikku commented 6 years ago

This is definitely something we'd like to have, someday maybe.

nikku commented 6 years ago

See https://github.com/bpmn-io/diagram-js/commit/148a87c575802db97de8a83d139cbf21ddaa79a1 for working demo.

hkupitz commented 1 year ago

Is there any reason the commit by @nikku hasn't been merged yet? Anything that is missing?

This feature would make my day-to-day life so much easier and I'd assume I'm not the only one.

Edit: I assume, the reason is the second task. I'll see if I can get this to work.

nikku commented 1 year ago

@hkupitz Thinking about this we could merge this without a preview (second task), too. We'd need to do another round of QA on this though.

hkupitz commented 1 year ago

Thanks for looking into it. I've just briefly played around with the local space-tool and it's a game changer for me personally, working with multiple pools in one diagram quite often. ❤

CatalinaMoisuc commented 1 year ago

@nikku will leave it to you to revive this once you are back.

nikku commented 1 year ago

@hkupitz unfortunately this did not make it into our last planning rounds.

Tagged with spring cleaning, I hope we'll be able to follow up via that route.

hkupitz commented 1 year ago

What exactly would be needed to continue with progressing on this? Can I help with it in any way?

nikku commented 1 year ago

You can update the diagram-js feature branch to the latest diagram-js version, and create a pull request for it.

nikku commented 1 year ago

In addition we'd need test cases to verify that the feature works (cf. space tool tests).

hkupitz commented 1 year ago

@nikku I've rebased the newest commits of diagram-js/develop onto the feature branch.

Still I'm wrapping my head around how I can simulate pressing the secondary modifier key (Shift) for the respective test(s). hasSecondaryModifier() goes by the MouseEvent, which in case of manually holding down Shift has the shiftKey flag set to true. How can I programmatically trigger this in the test case?

hkupitz commented 1 year ago

@nikku Any hints or pointers?