Skip to content

Right-click context menu and drawing functionality bugs #47

@iamAmer

Description

@iamAmer

There are several issues with the 2D canvas drawing application related to right-click behavior:

Problem 1: Right-click on grid gaps creates unwanted points

  • When right-clicking on the gaps between grid lines, a point is created
  • No context menu appears
  • Drawing functionality continues to work normally

Problem 2: Right-click on grid lines shows multiple context menus

  • When right-clicking on the grid lines themselves, both the browser's default context menu and the custom context menu appear
  • After this happens, drawing functionality stops working completely
  • This issue persists even after drawing for some time, not just on the first interaction

Problem 3: Points remain after deleting lines

  • When deleting a line, sometimes points (vertices) remain on the canvas
  • These orphaned vertices cannot be deleted through the interface
  • This creates visual clutter and potential confusion for users

Expected Behavior:

  1. Right-click on grid gaps should not create points and should show appropriate context menu or none at all
  2. Right-click on grid lines should only show custom context menu (no browser default menu)
  3. Drawing should continue to work after any right-click interaction
  4. When deleting a line, associated vertices should be properly cleaned up if they're no longer connected to other lines

Steps to Reproduce:

For Problem 1:

  1. Reload the page
  2. Right-click on the gaps between grid lines
  3. Observe that a point is created but no context menu appears
  4. Verify drawing still works

For Problem 2:

  1. Reload the page
  2. Right-click on the grid lines
  3. Observe both context menus appearing
  4. Try to draw - drawing functionality should be broken

For Problem 3:

  1. Draw multiple lines that share vertices
  2. Delete one line
  3. Check if orphaned vertices remain that cannot be deleted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions