Skip to content

Commit

Permalink
Conditionally show iteration frame controls
Browse files Browse the repository at this point in the history
  • Loading branch information
morrna committed Nov 24, 2024
1 parent 158e35f commit 6452903
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/Command.elm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ viewBar {iterMode, baseContents}
{ incrementerDefaults | label = "# iteration frames" , min = Just 0}
ChangeNumIterFrames
(Content.numIterFrames baseContents)
++ iterFrameKey
++ iterFrameKey iterMode.showIterFrames

layerVisibilityControls : List (HS.Html Message)
layerVisibilityControls
Expand Down Expand Up @@ -126,19 +126,23 @@ getNewIterFrameID {baseContents}
= ID.Trunk <| "f" ++ String.fromInt (1 + Content.numIterFrames baseContents)

iterFrameKey
: List (HS.Html msg)
iterFrameKey
= [
commandLabel "iteration frame controls"
, S.svg
: Bool
-> List (HS.Html msg)
iterFrameKey showIterFrames
= if showIterFrames
then
[
HSA.css
commandLabel "iteration frame controls"
, S.svg
[
Css.marginLeft (Css.px 16)
, Css.marginRight (Css.px 16)
HSA.css
[
Css.marginLeft (Css.px 16)
, Css.marginRight (Css.px 16)
]
]
[
IterFrame.showKey
]
]
[
IterFrame.showKey
]
]
else []

0 comments on commit 6452903

Please sign in to comment.