HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
437 stars 77 forks source link

Mouse events return Doubles (#238) #240

Closed brprice closed 4 years ago

brprice commented 4 years ago

Note that this is a breaking change in our API which is necessary to avoid crashing in some circumstances (for instance having a mousedown event on some SVG element with Firefox 76)

This fixes #238

brprice commented 4 years ago

Note that this changes the API so we should bump the version number.

All the samples in the threepenny-gui.cabal file run fine with this change, but I have no idea how much code in the wild may be affected by this.

HeinrichApfelmus commented 4 years ago

Thanks a lot!

I have added a function roundCoordinates that may be helpful for people who need to migrate, and a bit more documentation.

Unfortunately, I managed to screw up merging the branch that I had created for this purpose. I only have a new commit cf147cd495c8f996856dcd2c994bd2d0c570c8eb which makes this pull request obsolete. Sorry. 🙈

@sjakobi

When preparing the new release, could you

That would be swell

sjakobi commented 4 years ago

roundCoordinates looks like a very fine compatibility helper! :+1:

I have prepared a new release in https://github.com/HeinrichApfelmus/threepenny-gui/pull/242.

I'd appreciate a quick review from both of you, particularly on the changelog! :)

I'm closing this PR as superseded by https://github.com/HeinrichApfelmus/threepenny-gui/commit/cf147cd495c8f996856dcd2c994bd2d0c570c8eb.