Drawflow icon indicating copy to clipboard operation
Drawflow copied to clipboard

Can we create a grouped button node

Open amikum1997 opened this issue 3 years ago • 6 comments

I am willing to create a node that represents grouped button something like the screenshot I have attached. Screenshot from 2021-08-06 11-16-23

Is it possible with the current code or need some modifications?

amikum1997 avatar Aug 06 '21 05:08 amikum1997

Hi @amikum1997

That's just two nodes.

One with 4 outputs. And another with 1 entry and one exit.

You don't have to have a problem.

It would look something like this.

editor.addNode('buttons', 0, 4, 150, 300, 'buttons', {}, `Buttons`);
editor.addNode('question', 1, 1, 150, 300, 'question', {},  `Question Text`);

jerosoler avatar Aug 06 '21 06:08 jerosoler

@jerosoler thank you for the suggestion but the main issue I am facing is with the mapping of each output option with the next input node value I have tried your suggestion and got this Screenshot from 2021-08-06 12-29-30

in this, each option value is not getting mapped with the next input node id.

Need Help with this .

amikum1997 avatar Aug 06 '21 07:08 amikum1997

If you want it to connect to the new node automatically you can use this: #205

jerosoler avatar Aug 06 '21 07:08 jerosoler

@jerosoler Thanks for your reply.

But I want to know, how we map each output circle according to its correspondind button.

Like in the picture, output circles are at one place, not according to the buttons we have added.

The output circles are attached to the outer div, but I want them to link with each buttons.

amikum1997 avatar Aug 06 '21 07:08 amikum1997

The html content is not linked to the outputs. That is based on the logic of each component. But you can adjust each output using CSS. https://github.com/jerosoler/Drawflow/issues/149#issuecomment-813498435

jerosoler avatar Aug 06 '21 07:08 jerosoler

Other option, more simple:

  • https://github.com/jerosoler/Drawflow/issues/363#issuecomment-1050699201

jerosoler avatar Mar 10 '22 07:03 jerosoler