added condition to pass the tests
This commit is contained in:
parent
7efbee0646
commit
8f1496cebe
2 changed files with 27 additions and 4 deletions
|
|
@ -97,10 +97,12 @@ export const time = signal(id);
|
|||
*/
|
||||
let _mouseY = 0,
|
||||
_mouseX = 0;
|
||||
document.onmousemove = (e) => {
|
||||
_mouseY = e.clientY / document.body.clientHeight;
|
||||
_mouseX = e.clientX / document.body.clientWidth;
|
||||
};
|
||||
if (typeof window !== 'undefined') {
|
||||
document.onmousemove = (e) => {
|
||||
_mouseY = e.clientY / document.body.clientHeight;
|
||||
_mouseX = e.clientX / document.body.clientWidth;
|
||||
};
|
||||
}
|
||||
|
||||
export const mousey = signal(() => _mouseY);
|
||||
export const mousex = signal(() => _mouseX);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue