Skip to content

Commit

Permalink
Refactor menu, fix ripples on disabled menu items
Browse files Browse the repository at this point in the history
Fix ripples / onSelect engaging on disabled menu items.

Now maps over offsetTops, offsetHeights rather than continuously
looking up in Arrays. Avoids conversion List -> Array on Open event.

Fix #142.
  • Loading branch information
debois committed Aug 5, 2016
1 parent 0afdad5 commit 429adfb
Show file tree
Hide file tree
Showing 5 changed files with 530 additions and 285 deletions.
3 changes: 1 addition & 2 deletions demo/Demo.elm
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ main =
, view = view
, subscriptions = \model ->
Sub.batch
[ Sub.map MenusMsg (Menu.subs Demo.Menus.MDL model.menus.mdl)
[ Sub.map MenusMsg (Menu.subs Demo.Menus.Mdl model.menus.mdl)
, Layout.subs Mdl model.mdl
]
, update = update
Expand Down Expand Up @@ -425,7 +425,6 @@ stylesheet =
display: inline-block;
box-sizing: border-box;
min-width: 100%;
background-color: #f8f8f8;
padding-top: .5rem;
padding-bottom: 1rem;
padding-left:1rem;
Expand Down
2 changes: 2 additions & 0 deletions demo/Demo/Code.elm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Markdown
import Material.Elevation as Elevation
import Material.Options as Options exposing (css, div, stylesheet, Property)
import Material.Helpers as Helpers exposing (cmd)
import Material.Color as Color


type State
Expand Down Expand Up @@ -133,6 +134,7 @@ code options str =
[ css "overflow" "auto"
, css "border-radius" "2px"
, css "font-size" "10pt"
, Color.background (Color.color Color.BlueGrey Color.S50)
, Elevation.e2
] :: options)
[ Markdown.toHtml [] <| "```elm\n" ++ trim str ++ "\n```" ]
Expand Down
Loading

0 comments on commit 429adfb

Please sign in to comment.