Fix fog images pointer events
This commit is contained in:
parent
dbc372a0a0
commit
137b1715a7
3 changed files with 22 additions and 19 deletions
|
@ -1,8 +1,8 @@
|
||||||
function FogImages() {
|
function FogImages() {
|
||||||
return <>
|
return <>
|
||||||
<img className='fog-left' src={`/fog/fog2.png`} alt={`fog1.png`} />
|
<img className='fog left' src={`/fog/fog2.png`} alt={`fog1.png`} />
|
||||||
<img className='fog-right' src={`/fog/fog2.png`} alt={`fog1.png`} />
|
<img className='fog right' src={`/fog/fog2.png`} alt={`fog1.png`} />
|
||||||
<img className='fog-middle' src={`/fog/fog4.png`} alt={`fog4.png`} />
|
<img className='fog middle' src={`/fog/fog4.png`} alt={`fog4.png`} />
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { CSSProperties, useEffect, useReducer, useState } from 'react';
|
import { CSSProperties, useEffect, useReducer, useState } from 'react';
|
||||||
import Bluetooth from './Bluetooth';
|
import Bluetooth from './Bluetooth';
|
||||||
import BorderTiles from './BorderTiles';
|
import BorderTiles from './BorderTiles';
|
||||||
import FogImages from './FogImages';
|
// import FogImages from './FogImages';
|
||||||
import HitElems from './HitElems';
|
import HitElems from './HitElems';
|
||||||
import Labeling from './Labeling';
|
import Labeling from './Labeling';
|
||||||
import Ships from './Ships';
|
import Ships from './Ships';
|
||||||
|
@ -100,7 +100,7 @@ function Gamefield() {
|
||||||
<HitElems hits={hits} />
|
<HitElems hits={hits} />
|
||||||
|
|
||||||
{/* Fog images */}
|
{/* Fog images */}
|
||||||
<FogImages />
|
{/* <FogImages /> */}
|
||||||
<div className={`hit-svg target ${target.show ? 'show' : ''}`} style={{ '--x': target.x, '--y': target.y } as CSSProperties}>
|
<div className={`hit-svg target ${target.show ? 'show' : ''}`} style={{ '--x': target.x, '--y': target.y } as CSSProperties}>
|
||||||
<FontAwesomeIcon icon={faCrosshairs} />
|
<FontAwesomeIcon icon={faCrosshairs} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -167,20 +167,23 @@
|
||||||
border: 2px solid yellowgreen;
|
border: 2px solid yellowgreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fog-left {
|
.fog {
|
||||||
|
width: inherit;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
&.left {
|
||||||
grid-area: 1 / 1 / -1 / -1;
|
grid-area: 1 / 1 / -1 / -1;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
width: inherit;
|
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
.fog-right {
|
|
||||||
|
&.right {
|
||||||
grid-area: 1 / 1 / -1 / -1;
|
grid-area: 1 / 1 / -1 / -1;
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
width: inherit;
|
|
||||||
}
|
}
|
||||||
.fog-middle {
|
|
||||||
|
&.middle {
|
||||||
grid-area: 4 / 4 / -4 / -4;
|
grid-area: 4 / 4 / -4 / -4;
|
||||||
// align-self: flex-end;
|
}
|
||||||
width: inherit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue