feat(flow): 泳道拓宽计划(空泳道策略 + 多槽位泳道,三视图同步);发布 v1.3.4
- 空泳道策略(F2 文档设置 →「泳道」):动作全部移走的泳道可保留(默认,序号不变) 或自动移除;条形空行 / 圆周空环 / 流程空列与左侧栏占位行同步 - 泳道加宽(1–5 槽):双击条形视图左侧泳道编号 / 右键空白泳道 / 左侧栏「N 槽」徽标; 条形分子行(浅色虚线分隔)、圆周同色加宽环带 + 槽位虚线、流程图分子列且泳道带 随内容智能加宽;拖拽动作同时换道 + 换槽位;旧数据零迁移(row 语义改为槽位并自动钳制) - 流程图智能排开:同源同层扇出连线在空隙内均匀铺开;同层节点水平重叠自动推开 - 显示修复:画布左栏标题按真实行高排版(灰色副标题不再被换行标题压住, 持续换行到泳道高度不足);多槽位采用「槽位紧凑 + 泳道间拉开」的间隔 - 「时序创建和编辑」更名为「文档设置」(含对话框标题/帮助/文档);新增自动保存 (默认 10 分钟,可选 1/5/10/30 或关闭;写入文件并同步 .bak) - 授权临时冻结(kLicenseRequired=false):桌面版导出无需 .lic;关于页授权状态 「开放授权版本」、EDC 版权、开发者与交流群(邮箱 liuyu65@126.com、微信 online-goose) - 更新体验:直接升级到最新版本提示、下载过程保持屏幕常亮提示、 下载/上传统一限速 320KB/s(客户端限速 + 发布脚本 --limit-rate 320k) - docs/HELP.md 与帮助中心同步更新;新增 docs/ROADMAP.md 开发路线图 - flutter analyze 0 问题、40 项测试全过;演示截图更新(含泳道加宽与拥挤场景验证图)
This commit is contained in:
+38
-15
@@ -204,7 +204,7 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
} else {
|
||||
final CircularLayout layout = CircularLayout(c.project, size);
|
||||
for (final Action a in c.project.actions) {
|
||||
final double r = layout.radiusFor(a.layer);
|
||||
final double r = layout.radiusFor(a.layer, layout.slotOf(a));
|
||||
final double ds = (p - polar(layout.center, r, a.startAngle)).distance;
|
||||
final double de = (p - polar(layout.center, r, math.min(a.endAngle, 360))).distance;
|
||||
if (ds < bestDist) {
|
||||
@@ -478,6 +478,14 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
_renameZone(zi);
|
||||
return;
|
||||
}
|
||||
// 双击左侧泳道编号区(图外空白):打开泳道槽位菜单(加宽 / 恢复)。
|
||||
if (p.dx < BarLayout.leftGutter) {
|
||||
final BarLayout layout = BarLayout(c.project, size);
|
||||
if (layout.lanes.isNotEmpty) {
|
||||
_laneSlotMenu(d.globalPosition, layout.laneAt(p.dy));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
final Action? hit = c.project.viewState.mode == ViewMode.bar
|
||||
? BarLayout(c.project, size).hitTest(p, slop: _hitSlop)
|
||||
@@ -688,17 +696,16 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
status: '调整起始角',
|
||||
);
|
||||
} else {
|
||||
// 整体移动:水平改起始相位 + 垂直跟随泳道,两者可同时进行。
|
||||
// (原先要求「垂直分量明显大于水平」才换道,斜向拖拽几乎换不了道,
|
||||
// 表现为“有一股磁吸力、拖不到别的泳道”。)
|
||||
// 整体移动:水平改起始相位 + 垂直跟随泳道 / 槽位,两者可同时进行。
|
||||
c.setActionStart(_dragAction!.id, _startAngle + dx / layout.span * 360);
|
||||
final int curLane =
|
||||
c.project.actionById(_dragAction!.id)?.layer ?? _dragAction!.layer;
|
||||
final int target = layout.laneAt(p.dy);
|
||||
if (target != curLane) {
|
||||
_dropLane = target;
|
||||
_dropValid = c.canPlaceInLane(_dragAction!.id, target);
|
||||
c.moveActionLane(_dragAction!.id, target);
|
||||
final Action? cur = c.project.actionById(_dragAction!.id);
|
||||
final int curLane = cur?.layer ?? _dragAction!.layer;
|
||||
final int curSlot = cur == null ? 0 : layout.slotOf(cur);
|
||||
final (int, int) target = layout.laneSlotAt(p.dy);
|
||||
if (target.$1 != curLane || target.$2 != curSlot) {
|
||||
_dropLane = target.$1;
|
||||
_dropValid = c.canPlaceInLane(_dragAction!.id, target.$1, slot: target.$2);
|
||||
c.moveActionTo(_dragAction!.id, target.$1, target.$2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -724,9 +731,10 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
status: '调整起始角',
|
||||
);
|
||||
} else if (shift) {
|
||||
// Shift + 径向拖拽:换轨道(同轨道可放多个不重叠动作)。
|
||||
// Shift + 径向拖拽:换轨道 / 换子环(槽位)。
|
||||
final double rad = (p - layout.center).distance;
|
||||
c.moveActionLane(_dragAction!.id, layout.laneAtRadius(rad));
|
||||
final (int, int) t = layout.laneSlotAtRadius(rad);
|
||||
c.moveActionTo(_dragAction!.id, t.$1, t.$2);
|
||||
} else {
|
||||
c.setActionStart(_dragAction!.id, _startAngle + delta);
|
||||
}
|
||||
@@ -866,8 +874,17 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
? BarLayout(c.project, size).hitTest(local)
|
||||
: CircularLayout(c.project, size).hitTest(local);
|
||||
if (hit == null) {
|
||||
// 未命中动作:若命中依赖连线,弹出连线菜单。
|
||||
if (depKey != null) await _depMenu(global, depKey);
|
||||
// 未命中动作:先看依赖连线,其次(条形视图)提供泳道槽位菜单。
|
||||
if (depKey != null) {
|
||||
await _depMenu(global, depKey);
|
||||
return;
|
||||
}
|
||||
if (c.project.viewState.mode == ViewMode.bar) {
|
||||
final BarLayout layout = BarLayout(c.project, size);
|
||||
if (layout.lanes.isNotEmpty) {
|
||||
await _laneSlotMenu(global, layout.laneAt(local.dy));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
c.select(hit.id);
|
||||
@@ -925,6 +942,12 @@ class _CanvasViewState extends State<CanvasView> {
|
||||
}
|
||||
}
|
||||
|
||||
/// 泳道槽位菜单(实现见 [showLaneSlotMenu],画布与侧栏共用)。
|
||||
///
|
||||
/// 入口:双击条形视图左侧泳道编号区 / 右键空白泳道。
|
||||
Future<void> _laneSlotMenu(Offset global, int lane) =>
|
||||
showLaneSlotMenu(context, c, global, lane);
|
||||
|
||||
/// 相位分区右键菜单:重命名 / 插入 / 删除,实现任意增减。
|
||||
Future<void> _zoneMenu(Offset global, int index) async {
|
||||
final RenderBox box = context.findRenderObject()! as RenderBox;
|
||||
|
||||
Reference in New Issue
Block a user