Utilizing the p5.js library in combination with reactJS, I have successfully created interactive visuals on my screen.
Currently, when I click and drag my mouse on the screen, the background (or canvas) changes color thanks to p5.js.
However, I am facing an issue where clicking and dragging a new HTML element that I have made draggable also triggers a change in the canvas color. I want the interaction to be limited to the new element only, not affecting the canvas.
I have attempted adjusting the z-Index of the new element to be higher than the canvas container, but this solution did not work as expected. Any assistance or guidance on how to resolve this problem would be greatly appreciated!