Skip to content

Conversation

@pallavisarwar
Copy link
Collaborator

No description provided.

@pallavisarwar pallavisarwar requested a review from dannyelcf May 6, 2024 11:06
@pallavisarwar pallavisarwar self-assigned this May 6, 2024
document
.getElementById('user-interface')
.addEventListener('mousemove', (event) => {
import {MOUSE_USER_INTERFACE, MOUSE_MOVE, MOUSE_POSITION} from "../data/constants";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As these values are not used anymore, you can remove this import line.

const yValue = event.pageY;

// execute core logic
const formattedCoordinates = 'X: ' + xValue + '\nY: ' + yValue;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function formatCoordinates of the util.js.

Ex:

Suggested change
const formattedCoordinates = 'X: ' + xValue + '\nY: ' + yValue;
const formattedCoordinates = formatCoordinates(xValue, yValue);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants