Skip to content

Conversation

izambasiron
Copy link

This PR fixes #58

@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 08:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures the guide canvas no longer intercepts mouse events by setting pointer-events: none on its <canvas> elements.

  • Added pointerEvents = "none" to canvas styling in both guideline modules.
  • Aligned canvas reset logic to include pointer-events disabling.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/guidelines.js Added pointerEvents = "none" in two canvas style blocks to stop event blocking.
cytoscape-grid-guide.js Added pointerEvents = "none" in two canvas style blocks to stop event blocking.
Comments suppressed due to low confidence (2)

cytoscape-grid-guide.js:1825

  • Since the canvas now ignores pointer events, consider adding a test or integration scenario to verify underlying elements receive mouse interactions as intended.
    $canvas.style.pointerEvents = "none";

cytoscape-grid-guide.js:1825

  • [nitpick] Indentation here uses spaces but surrounding lines use tabs; please align with the existing indentation style for consistency.
    $canvas.style.pointerEvents = "none";

$canvas.style.top = 0;
$canvas.style.left = 0;
$canvas.style.zIndex = options.guidelinesStackOrder;
$canvas.style.pointerEvents = "none";
Copy link
Preview

Copilot AI Jul 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The canvas style assignments are duplicated across multiple blocks; consider extracting common style logic (including pointer-events) into a helper or reusing resetCanvas to reduce repetition.

Copilot uses AI. Check for mistakes.

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

Successfully merging this pull request may close these issues.

Canvas with z-index=1 is blocking pointer events
1 participant