create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 15 forks source link

Minor Bug or Feature. Cursor mapping in div with padding. #67

Closed olafgithub closed 2 years ago

olafgithub commented 3 years ago

Hi,

I was working on https://satadorus.eu/x_ite/yacs_2_0/yacs_2_0.html when I noticed a problem with the cursor mapping of a touchSensor...

NOTE: In the above file the issue is fixed already!

In the Y-direction the mouse cursor was a few pixels off. I wrote a test file and the problem was gone... I then added a test shape to my world: same problem. I removed most VRML code: same problem.

After a while, I figured out that I (maybe a copy-paste error) added padding: 8pix; to the div that contained the X_ITE browser window.

I checked that:

1) padding doesn't do anything: you can still move the 3D scene all the way to the border. 2) padding does change the width of the division just as it does for divisions containing text. 3) padding does however change the cursor mapping of a touchSensor in the Y-direction:

The pictures show what happens if you move the mouse cursor in, over, and then out of the shape from bottom to top,

capture_001 capture_002 capture_003 capture_004 capture_005

Thanks,

Olaf

create3000 commented 3 years ago

Thank you for reporting this bug, I could fix it.

olafgithub commented 3 years ago

Hello Holger,

Thanks!

I did a quick fix by just changing the CSS

Best regards from boring Eindhoven,

Olaf


Van: Holger Seelig @.> Verzonden: dinsdag 13 april 2021 12:19 Aan: create3000/x_ite @.> CC: olafgithub @.>; Author @.> Onderwerp: Re: [create3000/x_ite] Minor Bug or Feature. Cursor mapping in div with padding. (#67)

Thank you for reporting this bug, I could fix it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/create3000/x_ite/issues/67#issuecomment-818624560, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABOJCTFB2TL5F6DUXGIIKUTTIQLBJANCNFSM4WZCDXKA.