The Day Model and Timeline Positioning
AnyTool Time Blocking Planner keeps one day plan per date as its source of truth: a plan has an ISO day and an array of blocks, and each block carries a title, a start and an end expressed as minutes from midnight, and a category key that drives its colour. The visible day is a configurable window from a start hour to an end hour, and a fixed pixel height per hour converts times to positions: a block’s top = (start − startHour×60) ÷ 60 × rowHeight and its height = (end − start) ÷ 60 × rowHeight, so a block is drawn exactly where its times fall and any part outside the window is clipped. New blocks are made by clicking an empty slot (a default block snapped to the slot size) or by pressing and dragging down the empty rail to sweep out a start→end range; an existing block is moved by dragging its body and resized by its top or bottom handle. Every pointer gesture snaps to the chosen granularity — 15, 30 or 60 minutes — and exact times can also be typed in the block editor.
- Day plan = ISO day + blocks[]; each block has title, start & end in minutes from midnight, and a category
- Visible window = start hour → end hour; a fixed pixel height per hour converts minutes to pixels
- Block top = (start − startHour×60) ÷ 60 × rowHeight; height = (end − start) ÷ 60 × rowHeight
- Create by clicking a slot or dragging the rail; move by dragging the body, resize via top/bottom handles
- All gestures snap to a 15 / 30 / 60-minute slot; exact times can be typed in the editor
