Closed rtfeldman closed 6 years ago
Thanks for the remark! I've always played with elm apps having full control over DOM so didn't realized this unfortunate name collision. I don't mind re-exposing those.
Regarding the API, I've used the tuple convention with floats ( Float, Float )
in the rest of the package. In elm-lang/mouse, it's a record of integers that is used { x : Int, y : Int }
. Do you think I should
(1) simply expose as-is, noting that this is here mostly to avoid namespace collision
(2) Sub.map
the subscriptions to present at as a ( Float, Float )
I'm more for (1) since (2) would make no sense if I don't return a Mouse.Event
anyway.
Actually I don't know how to expose them. I also cannot import elm-lang Mouse
module without having a compiler error ...
Ha, good point!
I guess we're stuck then.
On Fri, Apr 6, 2018, 1:15 PM Matthieu Pizenberg notifications@github.com wrote:
Actually I don't know how to expose them. I also cannot import elm-lang Mouse module without having a compiler error ...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpizenberg/elm-pointer-events/issues/9#issuecomment-379318233, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCxwC4PKrxK3cVnDwwZ6kdaSClgwM6zks5tl6KjgaJpZM4TKTd4 .
It seems that Mouse
doesn't exist anymore in the new elm and that the only possible collision left is with zwilias/elm-touch-events Touch
module. Do you know if there is a mechanism in 0.19 to prevent those kind of collisions? Otherwise, I will probably try to find a fitting prefix namespace.
Modules are now all namespaced under Html.Events.Extra...
so there are no conflicts anymore. More info in changelog.
I'd like to use both this package as well as
elm-lang/mouse
forMouse.clicks
.This is currently impossible because both packages expose a module called
Mouse
, so as soon as I install both and writeimport Mouse
, I get an error because it's an ambiguous import (due to https://github.com/elm-lang/elm-compiler/issues/1625).elm-lang/mouse
only exposes 4 subscriptions. What do you think of addingelm-lang/mouse
as a dependency to this library and exposing them as well?