fix(交互/渲染): 手写笔拖拽、换泳道与依赖标签排版

- 触屏单指拖拽改走原始指针事件(绕开手势竞技场),手写笔拖拽端点更稳
- 端点把手优先命中:精确点在把手上也能选中并拖拽
- 换泳道不再因目标泳道时间重叠而拒绝(消除“磁吸回弹”),斜向拖拽也能换道
- 依赖标签:FS/SS 缩短、字号收小、去掉五角星;条形图上下/左右自动避让,
  圆周图沿半径自动避让,避免标签互相压盖
- 条形动作条 22→18px、泳道间距上限 52→58;圆周环宽略收窄、环间距上限提高
- 图例:关键路径改为「线条加粗光晕」示例
This commit is contained in:
2026-10-08 14:34:04 +08:00
parent 76d1ce0d9a
commit 5e30ab17a2
6 changed files with 292 additions and 82 deletions
+6 -8
View File
@@ -704,8 +704,9 @@ class AppController extends ChangeNotifier {
/// 将动作 [id] 移动到第 [targetLane] 条泳道 / 轨道(上下拖拽换道)。
///
/// 泳道可容纳多个动作;仅当目标泳道内存在**时间重叠**的动作时才拒绝,
/// 并给出状态提示(与音频轨道“不能重叠”的语义一致)。
/// 不再因「目标泳道在该时间段已有动作」而拒绝:换道是高频拖拽操作,一旦拒绝,
/// 动作会被“磁吸”回原泳道(表现为拖不动)。现允许放入并在状态栏提示时间重叠,
/// 由用户自行调整相位;[canPlaceInLane] 仍用于拖拽时的可视化提示。
void moveActionLane(String id, int targetLane) {
final Action? moving = _project.actionById(id);
if (moving == null) return;
@@ -715,13 +716,10 @@ class AppController extends ChangeNotifier {
o.id != id &&
o.layer == lane &&
angleRangesOverlap(moving.startAngle, moving.endAngle, o.startAngle, o.endAngle));
if (overlap) {
_status = '轨道 L${lane + 1} 在该时间段已有动作,无法放入';
notifyListeners();
return;
}
updateAction(id, (Action x) => x.copyWith(layer: lane, row: lane),
status: '移至轨道 L${lane + 1}');
status: overlap
? '移至轨道 L${lane + 1}(与该轨道动作时间重叠)'
: '移至轨道 L${lane + 1}');
}
/// 目标泳道 [lane] 是否能容纳动作 [id](不与其内动作时间重叠)。