git.iko.soy/typeable/elm-ui
on master help sign in
Merge pull request #123 from tomstejskal/master
f9728c1Matthew Griffith
src/Element.elm+5−9
@@ -1558,20 +1558,16 @@ classifyDevice : { window | height : Int, width : Int } -> Device
1558classifyDevice window =
1558classifyDevice window =
1559 { class =
1559 { class =
1560 let
1560 let
1561− shortSide =
1561+ longSide =
1562− if window.width < window.height then
1563− window.width
1564−
1565− else
1566− window.height
1562+ max window.width window.height
1567 in
1563 in
1568− if shortSide <= 600 then
1564+ if longSide <= 600 then
1569 Phone
1565 Phone
1570
1566
1571− else if shortSide > 600 && shortSide <= 1200 then
1567+ else if longSide > 600 && longSide <= 1200 then
1572 Tablet
1568 Tablet
1573
1569
1574− else if shortSide > 1200 && shortSide <= 1800 then
1570+ else if longSide > 1200 && longSide <= 1800 then
1575 Desktop
1571 Desktop
1576
1572
1577 else
1573 else