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

New: Added support for double click events #50

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

shashankshukla96
Copy link
Contributor

@shashankshukla96 shashankshukla96 commented Apr 24, 2023

This PR will add support for double click events, the library exposes the 3 new events

1. NODE_DOUBLE_CLICK :  Triggered when a node on the canvas is double clicked
2. EDGE_DOUBLE_CLICK : Triggered when an edge is double clicked.
3. MOUSE_DOUBLE_CLICK: Triggered when the canvas is double clicked.

For example, to handle NODE_DOUBLE_CLICK event we can use

orb.events.on(Orb.OrbEventType.NODE_DOUBLE_CLICK , (data) => {
      console.log("Node Double Clicked", data);
})

Copy link
Contributor

@tonilastre tonilastre left a comment

Choose a reason for hiding this comment

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

Btw, please run the npm run lint (and npm run lint:fix) to fix lint issues. I've added automatic lint in the baseline branch that will be used for your PR: #51

docs/events.md Show resolved Hide resolved
src/views/map-view.ts Show resolved Hide resolved
src/views/map-view.ts Show resolved Hide resolved
@tonilastre tonilastre changed the base branch from main to release/0.3.0 April 25, 2023 09:32
Copy link
Contributor

@tonilastre tonilastre left a comment

Choose a reason for hiding this comment

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

Great fix. There is one issue left around the consistency of events, so please check it out!

src/views/map-view.ts Outdated Show resolved Hide resolved
Co-authored-by: Toni <tonilastre@gmail.com>
Copy link
Contributor

@tonilastre tonilastre left a comment

Choose a reason for hiding this comment

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

Looks great. Please run npm run lint:fix once more and commit, there are 2 standing issues. Btw, from the next version forward, linting will be in the pre-commit hook.

@tonilastre tonilastre merged commit dcce593 into memgraph:release/0.3.0 Apr 27, 2023
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.

2 participants