# Idealine JavaScript Port

This is a JavaScript/HTML5 Canvas port of the original Java applet Idealine application.

## Quick Start

**Note:** You cannot simply open `Idealine.html` directly in the browser (file:// protocol) because browsers block fetch requests to local files for security reasons. You must use a web server.

### Python HTTP Server (Easiest)

1. Open a terminal in this directory
2. Run: `python3 -m http.server 8000` (or `python -m http.server 8000`)
3. Open your browser to: `http://localhost:8000/Idealine.html`

### Other Options

- **Node.js**: `npx http-server -p 8000`
- **PHP**: `php -S localhost:8000`
- **Ruby**: `ruby -run -e httpd . -p 8000`

## Files

- `Idealine.html` - Main HTML file
- `*.js` - JavaScript class files ported from the original Java source
- `Artist.tsv` - Artist database (tab-separated values)
- `Artwork.tsv` - Artwork database (tab-separated values)
- `words.txt` - Keywords file with coordinates

## Usage

1. Ensure all data files (`Artist.tsv`, `Artwork.tsv`, `words.txt`) are in the same directory as `Idealine.html`
2. Start a web server (see Quick Start above)
3. Open the application in your browser
4. The application will load the data files and display the visualization

## Features

- Interactive timeline visualization with "vines" representing different keywords/themes
- Search functionality to highlight artworks by title or artist
- Three geometry modes: Fan, Flat, and Totals
- Click on artworks to open their URLs in a new window
- Right-click or shift-click to highlight all works by an artist
- Hover over artworks to see detailed information in callouts

## Technical Notes

- Uses HTML5 Canvas for pixel-perfect rendering (no anti-aliasing)
- Maintains the same visual appearance as the original Java applet
- All graphics are rendered using Canvas 2D API
- No external frameworks or libraries required

## Browser Compatibility

Requires a modern browser with:
- HTML5 Canvas support
- ES6 JavaScript support
- Fetch API support
