Permalink
Browse files

Circle Drawer: Update the input radius value onInput

  • Loading branch information...
joakin committed Feb 2, 2019
1 parent 64353b6 commit 46199ab51baf507e9aa260072f9ad9efd5f1bc52
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/tasks/CircleDrawer/Main.elm
@@ -111,12 +111,15 @@ update msg ({ selectedCircle, circles } as model) =
model

RadiusInput id str ->
case String.toInt str of
Just radius ->
{ model | circles = updateCircleRadius id radius circles }
case ( model.modal, String.toInt str ) of
( Just _, Just radius ) ->
{ model
| circles = updateCircleRadius id radius circles
, modal = Just radius
}
|> replaceHistory

Nothing ->
_ ->
model

Undo ->

0 comments on commit 46199ab

Please sign in to comment.