diff --git a/src/Main.elm b/src/Main.elm index a534cf6..774952f 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -158,7 +158,7 @@ viewColumn heldOverTile columnIndex {name, tiles} = [] [text name] ) :: tilesList - ++ [ viewAddTile columnIndex ] + ++ [ viewAddTile isTileHeld columnIndex tileCount ] ) viewTile : Bool -> Int -> Int -> Tile -> Html Msg @@ -304,7 +304,9 @@ update msg model = case Debug.log "UPDATE" msg of Just oldHeldTileInfo -> let newTileIndex = - if oldHeldTileInfo.hoveredTileIndex == tileIndex + if oldHeldTileInfo.hoveredColumnIndex /= columnIndex + then tileIndex + else if oldHeldTileInfo.hoveredTileIndex == tileIndex then tileIndex + 1 else tileIndex in