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

fix: double click event handling #232

Merged
merged 4 commits into from
Oct 14, 2024
Merged

Conversation

tpoisseau
Copy link
Contributor

DOM pointerdown and pointerup do not contain number of click in detail like click events.

So I tweak GenericEditorArea.eventHappened to call handleDoubleClick on GenericMouseEvent.MOUSE_CLICKED

Closes: #225

DOM `pointerdown` and `pointerup` do not contain number of click in `detail` like `click` events.

So I tweak `GenericEditorArea.eventHappened` to call `handleDoubleClick` on `GenericMouseEvent.MOUSE_CLICKED`

Closes: #225
@tpoisseau tpoisseau requested a review from targos October 9, 2024 09:42
@tpoisseau tpoisseau linked an issue Oct 9, 2024 that may be closed by this pull request
@tpoisseau
Copy link
Contributor Author

@targos Do you confirm I must PR https://github.com/Actelion/openchemlib for java changes ?

@targos
Copy link
Member

targos commented Oct 9, 2024

@targos Do you confirm I must PR Actelion/openchemlib for java changes ?

Yes

tpoisseau added a commit to tpoisseau/openchemlib that referenced this pull request Oct 9, 2024
It's needed for https://github.com/cheminfo/openchemlib-js project

DOM `pointerdown` and `pointerup` do not contain number of click in `detail` like `click` events.
So I tweak `GenericEditorArea.eventHappened` to call `handleDoubleClick` on `GenericMouseEvent.MOUSE_CLICKED`

Refs: cheminfo/openchemlib-js#232
@tpoisseau
Copy link
Contributor Author

Done

@targos
Copy link
Member

targos commented Oct 14, 2024

Update of OCL in #233 fixed the issue according to my tests on the cloudflare preview.

Copy link

cloudflare-workers-and-pages bot commented Oct 14, 2024

Deploying openchemlib-js with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69f9d12
Status: ✅  Deploy successful!
Preview URL: https://688c3247.openchemlib-js.pages.dev
Branch Preview URL: https://225-double-click-on-atom--bo.openchemlib-js.pages.dev

View logs

@tpoisseau
Copy link
Contributor Author

tpoisseau commented Oct 14, 2024

Ok, I updated openchemlib submodule (and update the copy). Seems works as expected.
I let you approve @targos before I merge

@targos
Copy link
Member

targos commented Oct 14, 2024

But I already updated the submodule and the copy in #233

@tpoisseau
Copy link
Contributor Author

Yes, So I just merged and added comment (so we don't think it's missing).

This PR remove event.detail on clickCount argument.

@tpoisseau tpoisseau merged commit 8cb438b into main Oct 14, 2024
5 checks passed
@tpoisseau tpoisseau deleted the 225-double-click-on-atom--bond branch October 14, 2024 08:35
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.

Double click on atom / bond
2 participants