Add comment that z is unused and fix warning.

This commit is contained in:
Robbie Gleichman 2020-08-09 14:03:57 -07:00
parent ed36330f5c
commit f58cebe4cd

View File

@ -45,6 +45,7 @@ data Element = Element
{ _elPosition :: !(Double, Double) -- ^ (x, y) of top left corner { _elPosition :: !(Double, Double) -- ^ (x, y) of top left corner
, _elSize :: !(Double, Double) -- ^ (width, height) , _elSize :: !(Double, Double) -- ^ (width, height)
, _elZ :: Int -- ^ Depth. Higher values are drawn on top , _elZ :: Int -- ^ Depth. Higher values are drawn on top
-- _elZ is currently ignored
} }
data AppState = AppState data AppState = AppState
@ -253,7 +254,7 @@ startApp app = do
findElementByPosition :: IntMap.IntMap Element -> (Double, Double) -> Maybe (Int) findElementByPosition :: IntMap.IntMap Element -> (Double, Double) -> Maybe (Int)
findElementByPosition elements (mouseX, mouseY) = findElementByPosition elements (mouseX, mouseY) =
let let
mouseInElement (elementId, Element{_elPosition, _elSize}) = mouseInElement (_elementId, Element{_elPosition, _elSize}) =
let let
(x, y) = _elPosition (x, y) = _elPosition
(width, height) = _elSize (width, height) = _elSize