Skip to content

How to move a link #317

Description

@aiekick

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions