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

Callbacks Not Triggering for Node Manipulations in Node Editor #2328

Open
gaviral opened this issue May 11, 2024 · 0 comments
Open

Callbacks Not Triggering for Node Manipulations in Node Editor #2328

gaviral opened this issue May 11, 2024 · 0 comments
Labels
state: pending not addressed yet type: bug bug

Comments

@gaviral
Copy link

gaviral commented May 11, 2024

Version of Dear PyGui

Version: 1.11.1
Operating System: macOS Sonoma 14.4.1 (Darwin Kernel Version 23.4.0)

My Issue/Question

The drag_callback and drop_callback functions in the node editor are not producing the expected console output when nodes are manipulated. Despite setting up straightforward callback functions to log messages, no feedback appears in the console when nodes are dragged or dropped.

To Reproduce

Steps to reproduce the behavior:

  1. Initialize Dear PyGui with the provided code snippet.
  2. In a window, set up a node editor and add a node with both drag_callback and drop_callback functions.
  3. Launch the application and interact with the node by dragging and dropping it within the editor.
  4. Observe the lack of expected console messages detailing the actions, indicating that the callbacks are not being triggered.

Expected Behavior

Upon dragging or dropping a node within the node editor, the console should display messages such as 'Node [node ID] dragged' and 'Node [node ID] dropped'. This feedback is essential for verifying that the node interactions are being handled correctly.

Screenshots/Video

For a visual representation of the issue, refer to the linked video:
Bug Report GIF

Standalone, Minimal, Complete and Verifiable Example

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Node Editor Example"):
    with dpg.node_editor():
        node = dpg.add_node(label="Sample Node", drag_callback=lambda s, a, u: print(f"Node {s} dragged"), drop_callback=lambda s, a, u: print(f"Node {s} dropped"))

print("TESTING!!")  # This print statement should appear immediately on running.

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

This code demonstrates a lack of feedback from the drag_callback and drop_callback during node interactions within the node editor.

@gaviral gaviral added state: pending not addressed yet type: bug bug labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet type: bug bug
Projects
None yet
Development

No branches or pull requests

1 participant