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

Support images for participants #36

Closed
Drarig29 opened this issue Mar 8, 2021 · 4 comments
Closed

Support images for participants #36

Drarig29 opened this issue Mar 8, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@Drarig29
Copy link
Owner

Drarig29 commented Mar 8, 2021

Example of use (taken from here):

image

I think a function should provide images (or null) for each participant before calling render().

@Drarig29 Drarig29 added the enhancement New feature or request label Mar 8, 2021
@qlaffont
Copy link

Yes, and maybe to add an event listener onClick to handle :

  • Click on participant
  • Click on match

@qlaffont
Copy link

Actually I can handle click on match with this :

document
        .querySelectorAll('[data-match-id]')
        .forEach((element) =>
          element.addEventListener('click', () =>
            console.log(element.getAttribute('data-match-id')),
          ),
        );

@Drarig29
Copy link
Owner Author

Yes, and maybe to add an event listener onClick to handle :

  • Click on participant
  • Click on match

This is related to #38.

And no, I won't add an event listener for a click on a participant because it will be mistaken for a click on a match. So I'll only add a listener for a click on a match. And you, in a match page for example, can do something to handle clicks on a participant afterwards.

It works like this in Toornament, and I like it.

Drarig29 added a commit that referenced this issue Jun 11, 2021
@Drarig29
Copy link
Owner Author

Actually I can handle click on match with this :

document
        .querySelectorAll('[data-match-id]')
        .forEach((element) =>
          element.addEventListener('click', () =>
            console.log(element.getAttribute('data-match-id')),
          ),
        );

You can now use ae66b72

Drarig29 added a commit that referenced this issue Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants