This simple web application allows users to draw and interact with ovals on an HTML canvas. You can draw ovals by clicking and dragging on the canvas, and you can also select and drag existing ovals to new positions.
- Drawing: Click and drag to draw ovals on the canvas.
- Selection: Click inside an existing oval to select it.
- Dragging: Move selected ovals to new positions by dragging them.
- Color Cycling: Each newly drawn oval cycles through predefined colors.
- HTML5 Canvas: Used for drawing and rendering ovals.
- JavaScript: Handles user interactions, oval drawing, selection, and dragging.
- CSS: Provides basic styling for the canvas and page layout.
To run this application locally, follow these steps:
-
Clone the repository:
git clone <repository-url> cd draw-and-drag-ovals
-
Open
index.html
in your web browser. -
Click on the canvas to draw ovals. Click inside an oval to select it, then drag to move it.
- Drawing: Click and drag on the canvas to draw ovals.
- Selection: Click inside an existing oval to select it for dragging.
- Dragging: While holding the mouse down inside a selected oval, drag it to move it to a new position.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need to create interactive drawing tools in web applications.
- Built with guidance from various online tutorials and resources on HTML5 canvas and JavaScript.