Reduce helm knob size and travel
This commit is contained in:
parent
0366eeffe8
commit
42ebf6a763
@ -177,7 +177,7 @@ if (!isDesktopPointer.matches) {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 46%;
|
top: 46%;
|
||||||
width: 32%;
|
width: 24%;
|
||||||
height: auto;
|
height: auto;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
@ -501,7 +501,7 @@ if (!isDesktopPointer.matches) {
|
|||||||
const radarContacts = radarPiece.querySelector('#steam-radar-contacts');
|
const radarContacts = radarPiece.querySelector('#steam-radar-contacts');
|
||||||
|
|
||||||
const setHelmKnob = (x = 0, y = 0) => {
|
const setHelmKnob = (x = 0, y = 0) => {
|
||||||
const maxOffset = Math.min(radarPiece.clientWidth * 0.20, 32);
|
const maxOffset = Math.min(radarPiece.clientWidth * 0.18, 28);
|
||||||
const px = Math.max(-1, Math.min(1, x)) * maxOffset;
|
const px = Math.max(-1, Math.min(1, x)) * maxOffset;
|
||||||
const py = Math.max(-1, Math.min(1, y)) * maxOffset;
|
const py = Math.max(-1, Math.min(1, y)) * maxOffset;
|
||||||
helmKnob.style.transform = `translate(-50%, -50%) translate(${px}px, ${py}px)`;
|
helmKnob.style.transform = `translate(-50%, -50%) translate(${px}px, ${py}px)`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user