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

How to move a link #317

Open
aiekick opened this issue Jan 4, 2025 · 0 comments
Open

How to move a link #317

aiekick opened this issue Jan 4, 2025 · 0 comments

Comments

@aiekick
Copy link

aiekick commented Jan 4, 2025

Hello TheDmd,

first of all, thank you very mush for this great lib im using now since many years (Mostly in Lumo)

Its not a bug, just a request for a way to do a thing.

I would like to add a easy way to move a link from a pin to another pin. like redirect a link.
In my case an output pin can have many links, but only one link can be connected to input pin.

so i would like to by just click on a connected input pin redirect the link to another pin.

if im not bad, i seen a comment somewhere of you where you speak about that (or i dreamed, not found back the comment)

Its a feature who is already available or not ?

for add a link im using this code :

if (nd::QueryNewNode(&slotId)) {
    auto slot_ptr = m_findSlot(slotId).lock();
    if (slot_ptr->getDatas<ez::SlotDatas>().dir == ez::SlotDir::INPUT) {
        showLabel("+ Redirect link", ImColor(32, 45, 32, 180));
    } else if (slot_ptr->getDatas<ez::SlotDatas>().dir == ez::SlotDir::OUTPUT) {
        showLabel("+ Create Node", ImColor(32, 45, 32, 180));
        if (nd::AcceptNewItem()) {
            m_doCreateNodeFromSlot(slot_ptr);
        }
    }
}

but move a already existing link is a different behavior.

if i click on a input slot, i would like to have the link from the pin who was connected to the input pin i clicked on.

you know is there is way to specfiy the pin id for the start of the link drawing ?

maybe a function to add for set the the pins m_StartPin and m_EndPin for this particular case ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant