targetPreview missle fix
`targetPreview` did not show up when moving the mouse from an empty to a missle field and then back to the empty field. The cause of the problem was no update of the position when going over the missle field and when going back resultend in no `potisionChange` which reslted into an early return. Fixed this by adding the dependency `show` for early return caused by no `positionChange` which blocks the early return when `targetPreview` is not being `show`-n.
This commit is contained in:
parent
e3733b6f7e
commit
0f03753612
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ function App() {
|
|||
const {newX, newY, shouldShow, appearOK, eventReady, show, x, y} = targetPreview;
|
||||
const positionChange = !(x === newX && y === newY);
|
||||
// if not ready or no new position
|
||||
if (!eventReady || !positionChange)
|
||||
if (!eventReady || (!positionChange && show))
|
||||
return;
|
||||
if (show) {
|
||||
// hide preview to change position when hidden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue