Fix click issues

This commit is contained in:
Thomas Forgione 2021-06-09 15:07:15 +02:00
parent 9f385f3398
commit 6c71821c13
1 changed files with 30 additions and 17 deletions

View File

@ -121,7 +121,12 @@ video model =
Element.none Element.none
loadedElement = loadedElement =
Element.row [ Element.width Element.fill, Element.height (Element.px 5), Element.centerY, Border.rounded 5 ] Element.row
[ Element.width Element.fill
, Element.height (Element.px 5)
, Element.centerY
, Border.rounded 5
]
(List.map showRange loadedToShow) (List.map showRange loadedToShow)
remaining = remaining =
@ -136,10 +141,10 @@ video model =
, Background.gradient { angle = 0, steps = [ Element.rgba 0 0 0 0.75, Element.rgba 0 0 0 0 ] } , Background.gradient { angle = 0, steps = [ Element.rgba 0 0 0 0.75, Element.rgba 0 0 0 0 ] }
] ]
[ Element.row [ Element.row
(Element.width Element.fill [ Element.width Element.fill
:: Element.height (Element.px 30) , Element.height (Element.px 30)
:: Border.rounded 5 , Border.rounded 5
:: Element.behindContent , Element.behindContent
(Element.el (Element.el
[ Background.color (Element.rgba 0.4 0.4 0.4 0.75) [ Background.color (Element.rgba 0.4 0.4 0.4 0.75)
, Element.width Element.fill , Element.width Element.fill
@ -149,9 +154,17 @@ video model =
] ]
Element.none Element.none
) )
:: Element.behindContent loadedElement , Element.behindContent loadedElement
, Element.inFront
(Element.el
(Element.width Element.fill
:: Element.height Element.fill
:: Element.pointer
:: seekBarEvents :: seekBarEvents
) )
Element.none
)
]
[ Element.el [ Element.el
[ Background.color (Element.rgba 1 0 0 0.75) [ Background.color (Element.rgba 1 0 0 0.75)
, Element.width (Element.fillPortion seen) , Element.width (Element.fillPortion seen)
@ -233,7 +246,7 @@ decodeVolumeChange =
decodeSeek : Decode.Decoder Msg decodeSeek : Decode.Decoder Msg
decodeSeek = decodeSeek =
Decode.map2 (\x y -> Seek (toFloat x / 980)) Decode.map2 (\x y -> Seek (toFloat x / toFloat y))
(Decode.field "layerX" Decode.int) (Decode.field "layerX" Decode.int)
(Dom.target <| Decode.field "offsetWidth" Decode.int) (Dom.target <| Decode.field "offsetWidth" Decode.int)