Two operator-visible fixes from the 0.5.2 review:
(1) Draft line stopped short of the cursor. EdgePainter
shortens every segment endpoint by portRadius to dock at
port-dot perimeters — but the DRAFT segment's `to` is the
cursor itself, not a port. Result: while dragging a
connection, the live line ended 6 px short of where the
operator's mouse actually was. Felt like the cable
wouldn't reach.
EdgeSegment gains `shortenFrom` / `shortenTo` flags
(default true). The draft segment passes `shortenTo:
false`, so the line tip tracks the cursor exactly. From-
side stays shortened because the FROM is still a real
port dot.
(2) Ports had no hover affordance — mouse-over was
invisible. Operators couldn't tell ahead of time that a
port was interactive.
Adds `_hoveredPort` state on the canvas, updated via the
existing MouseRegion's onEnter / onExit. Port dot now has
three focus levels:
resting → 12 px, 1.8 px border, no glow
hover → 15 px, 2.2 px border, soft accent glow
drop-target (drag is over it) → 18 px, 2.5 px border,
stronger glow
The hover state pre-shadows the drop-target state —
operators see "yes, this port is grabbable / droppable"
before they commit to dragging. When the drag does start,
the drop-target halo is the same family of treatment,
just stronger, so the visual progression reads as one
continuous interaction.
Signed-off-by: flemming-it <sf@flemming.it>
27 lines
738 B
YAML
27 lines
738 B
YAML
name: fai_studio_flow_editor
|
|
description: Swappable inline YAML editor for F∆I Studio flows.
|
|
version: 0.5.3
|
|
publish_to: 'none'
|
|
repository: https://git.flemming.ai/fai/studio-flow-editor
|
|
|
|
environment:
|
|
sdk: ^3.11.0-200.1.beta
|
|
flutter: '>=3.30.0'
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
# CodeMirror-style code editor + the highlight package's
|
|
# YAML grammar. Both are pure Dart so the editor stays
|
|
# WebView-free and ships in the same binary.
|
|
flutter_code_editor: ^0.3.5
|
|
highlight: ^0.7.0
|
|
# YAML parsing for the graph view's model layer. We
|
|
# round-trip text <-> graph via this; the graph never
|
|
# mutates the YAML directly.
|
|
yaml: ^3.1.2
|
|
|
|
dev_dependencies:
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^6.0.0
|