Bug Fix: Moving to a new column shifts wrong tile
This commit is contained in:
parent
05d0ab9e56
commit
1e6c72f067
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue