Skip to content

feat: Shift-aligned drawing, pan through fills, copyable layouts - #54

Merged
cyenite merged 1 commit into
mainfrom
feat/drawing-shift-align-and-layout-copies
Nov 3, 2026
Merged

cyenite merged 1 commit into
mainfrom
feat/drawing-shift-align-and-layout-copies

Conversation

@cyenite

@cyenite cyenite commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Shift snapping, as in TradingView. Holding Shift while placing or dragging a line's point snaps it level, upright or to 45 degrees from the previous point, and ignores the magnet. Shift while dragging a whole drawing moves it only sideways or only up and down (after 10px). Ctrl still turns the magnet on or off.
  • Panning over drawings from higher timeframes. Drawing fills (channels, Fibonacci zones, rectangles, circles and similar) are now backgrounds the mouse passes through, as in TradingView, so dragging inside a channel drawn on a higher timeframe pans the chart instead of moving the channel. Drawings are grabbed by their lines; position tools and text boxes still pick up by their body.
  • Tabs are now "Layouts". The + buttons and Window > New Layout offer Blank Layout or Copy of ... an open layout, which copies its charts, drawings, indicators and settings with fresh ids. Right-clicking a layout offers Duplicate Layout. Only the UI text changed; saved profiles load unchanged. The grid submenu is now Layout Setup, matching the toolbar button.

Test plan

  • npm run typecheck
  • npm test (706 pass), with new tests for background hit-testing, 45-degree alignment and layout copies
  • npm run build
  • Real mouse input in the Electron harness with the mock backend: a drag inside a parallel channel panned the view and left the channel unchanged; Shift-drawn lines came out level (equal prices with the strong magnet on), at 45 degrees (144 x 144 px) and upright (equal times); a Shift-dragged line kept its price; a copied layout showed the original's drawings

- Shift while placing or dragging a line's point snaps it level, upright
  or to 45 degrees from the previous point and ignores the magnet; Shift
  while moving a drawing keeps the move level or upright, as TradingView.
- Drawing fills are backgrounds the mouse passes through, so dragging
  inside a channel or zone drawn on a higher timeframe pans the chart
  instead of moving the drawing. Drawings are grabbed by their lines.
- Chart tabs are called layouts in the UI. The + buttons and Window menu
  open a blank layout or a copy of an open one with its charts, drawings,
  indicators and settings; a layout's menu offers Duplicate Layout.
@cyenite
cyenite merged commit 2605c67 into main Nov 3, 2026
4 checks passed
@cyenite cyenite mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant