Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

On mouse click - object mapping

Public visualization

Viewing a saved revision (read-only)

01f780dfb2954a7ab9acab1090aa9f9a

On mouse click - object mapping

0 stars1🌍 Public
NNita
Last edited May 29, 2020
Created on May 29, 2020

Clicking the SVG triggers a state update that maps the mouse click position to a single green circle, which appears centered at the clicked coordinates. Built with React, the app uses the `useState` and `useCallback` hooks to track the clientX and clientY values from the click event. The circle, rendered with a fixed radius of 50 pixels, is positioned using the SVG `<circle>` element within a 960x500 viewport. No external visualization library is used; the mapping relies solely on React’s state management to reflect the latest click position.

AI-generated description

React Starter code.