jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.51k stars 745 forks source link

mouse x and y not integers inside of an iframe #2590

Closed ToonTalk closed 4 years ago

ToonTalk commented 4 years ago

https://snap.berkeley.edu/project?user=toontalk&project=mouse%20test

This led to a bug in my project since it was computing a list index using mouse x and y and it worked fine unless in an iframe.

Windows 10 Chrome Version 81.0.4044.138 (Official Build) (64-bit)

jmoenig commented 4 years ago

thanks, Ken. There seems to be an issue with the function that determines coordinates on a canvas embedded in a web page. This is biting me in other contexts as well. Investigating...

jmoenig commented 4 years ago

Can you perhaps check again with the beta version? I made a few changes to how coordinates are determined in Morphic. Thanks!

ToonTalk commented 4 years ago

I just tried an HTML file whose entire contents are: