Allow detecting the mouse in the gaps between tiles
This commit is contained in:
parent
5c9a98df73
commit
17cc6ffb7f
|
@ -175,13 +175,13 @@ viewTile isTileHeld columnIndex tileIndex tile =
|
|||
(D.field "layerX" D.int)
|
||||
(D.field "layerY" D.int)
|
||||
)
|
||||
, attributeIf isTileHeld (onMouseEnter <| HeldOverNewTile columnIndex tileIndex)
|
||||
]
|
||||
[ input
|
||||
[ value tile.text
|
||||
, onInput (SetTileText columnIndex tileIndex)
|
||||
, onBlur (TileDeselected columnIndex)
|
||||
, attributeIf (isBlank tile.text) (id "new-tile")
|
||||
, attributeIf isTileHeld (onMouseEnter <| HeldOverNewTile columnIndex tileIndex)
|
||||
]
|
||||
[]
|
||||
, svg
|
||||
|
|
|
@ -57,6 +57,14 @@ input
|
|||
margin-bottom: 15px
|
||||
border: none
|
||||
|
||||
&::after
|
||||
width: 400px
|
||||
height: 20px
|
||||
content: ''
|
||||
position: absolute
|
||||
top: -20px
|
||||
z-index: -1 // Prevent fluttering when moving mouse up
|
||||
|
||||
input
|
||||
padding: 20px
|
||||
margin: 0
|
||||
|
@ -77,6 +85,7 @@ input
|
|||
pointer-events: none // Allow clicking the input box below this
|
||||
|
||||
&.add-tile
|
||||
padding: 0
|
||||
text-align: center
|
||||
font-weight: bold
|
||||
font-size: 80px
|
||||
|
|
Loading…
Reference in New Issue