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

Pass through google rightclick event to onClick #7728

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/google-maps/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function createDeckInstance(

const eventListeners = {
click: null,
rightclick: null,
dblclick: null,
mousemove: null,
mouseout: null
Expand Down Expand Up @@ -293,6 +294,8 @@ function handleMouseEvent(deck: Deck, type: string, event) {

switch (type) {
case 'click':
case 'rightclick':
mockEvent.type = 'click';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you need to set button here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is that a standard API, do we do that elsewhere? I can add it but it can already be obtained from event.srcEvent.domEvent.button

mockEvent.tapCount = 1;
// Hack: because we do not listen to pointer down, perform picking now
deck._onPointerDown(mockEvent as MjolnirPointerEvent);
Expand Down