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

Touch and resize issues on mobile android chome #24

Open
CrazyFlasher opened this issue Jul 6, 2021 · 9 comments
Open

Touch and resize issues on mobile android chome #24

CrazyFlasher opened this issue Jul 6, 2021 · 9 comments

Comments

@CrazyFlasher
Copy link

CrazyFlasher commented Jul 6, 2021

Using this sample
https://github.com/haxeui/component-examples/tree/master/buttons

http://188.166.108.195/testui/ - build

  1. Touches doesn't work
  2. Content is shown only in landscape mode
  3. After rotating device - weird scaling

Scaling content issues can be easily reproduced on desktop. Just resize the window.

Took latest git of heaps, haxeui-code and haxeui-heaps
Build script:

-cp src
-main Main

-lib haxeui-core
-lib haxeui-heaps
-lib heaps

-js build/html5/Main.js
@ianharrigan
Copy link
Member

Is heaps supported in mobile browers? My understanding was that heaps wasnt a mobile framework... but maybe thats inaccurate?

@CrazyFlasher
Copy link
Author

https://heaps.io/samples/index.html
Yes, it is supported

@ianharrigan
Copy link
Member

Right, so i guess ill have to test it a little... the scaling one is fairly easy, its because the canvas in your test app is 100%x100%... so i suppose it makes sense that its scaled all weird... not sure a good way around that...

I mean, if you take one of those heaps samples and make it full page 100%x100% then i guess they will also behave strangely wrt to scale?

Although interestingly, when i look at them in fullscreen:

https://heaps.io/samples/adjustColor/

or

https://heaps.io/samples/pbr/

And resize the browser things look alright... i can see heaps stuttering though so it looks like its doing something ill have to take a look and see - but it wont be till the weekend most likely since it doesnt look like a 5 second job

Cheers,
Ian

@CrazyFlasher
Copy link
Author

I mean, if you take one of those heaps samples and make it full page 100%x100% then i guess they will also behave strangely wrt to scale?

Scaling is fine for samples. For ex. check this sample:
http://188.166.108.195/heaps/build/base2D/

And resize the browser things look alright... i can see heaps stuttering though so it looks like its doing something ill have to take a look and see - but it wont be till the weekend most likely since it doesnt look like a 5 second job

thanks!

@CrazyFlasher
Copy link
Author

I've build heaps samples from github and got the same scaling issue:
image

The html are exactly the same,
Howerver on their site resizing page works fine. I've report the issue in heaps repo
https://heaps.io/samples/base2D/

@CrazyFlasher
Copy link
Author

I found what causes the issue and it is heaps related:
HeapsIO/heaps#986

@MSGhero
Copy link
Member

MSGhero commented Mar 4, 2022

My touch input is working on JS (iPhone Safari browser), but the x,y of the touch is always 0,0. This is because Window.getInstance().mouseX/Y are not updated on touch. event.relX/Y are what is updated. I would have to mess with scaling and stuff before just committing this, as that may not be the right numbers to report to HaxeUI.

@ianharrigan
Copy link
Member

Interesting, so could relX / relY be use "across the board" (ie, even on desktop)

ianharrigan added a commit that referenced this issue Mar 31, 2022
@ianharrigan
Copy link
Member

Seems to work fine, yeah... i mean, its relative, but its relative to the root (which is usually s2d), so i guess thats fine, and the same as window absolute i would guess.

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

No branches or pull requests

3 participants