-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Two sticks in a row #7
Comments
Hi @tompe17 can you send me the HTML you use to reproduce the problem, with the table and other solution you have tested? |
https://jsfiddle.net/ssktkr/2mn5uyae/ Please see right one. |
Hi @takeru and @tompe17 , I see that the problem is related to the use of TABLE tag, that not work correctly with "offset....." properties of elements. |
Ok pushed the example, and you can see in action here http://bobboteck.github.io/joy/joy.html |
Sorry not getting back on this but I did not have my example easily available since I managed to place them after each other in a way that worked in my app. But thanks for the example, I will look at it and see if placing it sidwise works better. |
Looking at your code it seems to be "inline-flex" I missed that it exists. I tried some inline with div but could not get it to work. But good that it works. I liked this code because it was only javascript and no dependencies on big libraries. |
On a mobile device the two joysticks won't work together. The second press makes the relevant joystick follow the first press possition. |
I'm running into the same problem as @jondurrant. I suspect it is because you are not discriminating the location (X,Y) of the touchstart event. The pressed=1 assignment should only be made for a given JoyStick instance if the (X,Y) happens inside its own canvas area. |
Ok, I have a fix for this issue. Replace the
You have to use |
Sorry, I added in some |
Hi guys, sorry but this days I'm very busy, I hope to work on this issue in the weekend. @liamw9534 your suggestion is interesting, but I have the doubt that its works whell only if use one JoyStick at time. You have tested a case of simultaneous use of Stick? |
Hello there,
Yes, I tested it with simultaneous sticks (2 side-by-side). It works well.
Liam.
…On Fri, 17 Apr 2020 at 10:42, bobboteck ***@***.***> wrote:
Hi guys, sorry but this days I'm very busy, I hope to work on this issue
in the weekend.
@liamw9534 <https://github.com/liamw9534> your suggestion is interesting,
but I have the doubt that its works whell only if use one JoyStick at time.
You have tested a case of simultaneous use of Stick?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRST2JM4BDQQFAU47YAJDRNAP75ANCNFSM4K74S2QA>
.
|
Hi @liamw9534 , I try your suggestion on my example page http://bobboteck.github.io/joy/joy.html, but I continue to have the problem with the use of the two simultaneos sticks. |
I am using chrome too. I'll send you my example code tomorrow.
…On Sun, 19 Apr 2020, 22:26 bobboteck, ***@***.***> wrote:
Hi @liamw9534 <https://github.com/liamw9534> , I try your suggestion on
my example page http://bobboteck.github.io/joy/joy.html, but I continue
to have the problem with the use of the two simultaneos sticks.
I use Chrome on Android, you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRST3GPGM2ZD2N4LNVWNDRNNT75ANCNFSM4K74S2QA>
.
|
Hi, the attached test code uses GetX and GetY only which is the only methods I am interested in for my project. Tested using chrome. |
Thanks @liamw9534 , I was not aware of the change to the next lines, now I have modified the code correctly and it works for me too. |
Welcome! It's a great and useful project so I am glad to help.
…On Mon, 20 Apr 2020 at 13:31, bobboteck ***@***.***> wrote:
Thanks @liamw9534 <https://github.com/liamw9534> , I was not aware of the
change to the next lines, now I have modified the code correctly and it
works for me too.
As soon as I have some time to spare, I make changes to the code and
publish the new version.
Thanks again for the suggestion!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRST6SJSGQ7JVDRBBDP53RNQ6ALANCNFSM4K74S2QA>
.
|
Hi @liamw9534 @tompe17 @takeru @jondurrant , I would like if possible to share on the Repository Wiki (even if it is practically empty for now), the projects of those who have used it. |
I am trying to place two sticks in a row. I tried putting them in a table but there is something wrong with the input then since the movements are not correct. I suppose the canvas coordinates might be messed up.
So my question is how can I do what I want to do? It works placing them in div that ends up in two different blocks. Making the divs inline or using span instead of div and it does not work.
The text was updated successfully, but these errors were encountered: