Диаграммы

This commit is contained in:
2026-04-10 02:21:47 +03:00
parent 8580dbc199
commit 72db2c0a47
12 changed files with 252 additions and 12 deletions

View File

@@ -0,0 +1,56 @@
@startuml dz-v1-editor-animation-flow
title ДЗ.В1 — анимация (EditorViewModel)
skinparam shadowing false
skinparam ActivityFontSize 11
skinparam ActivityBackgroundColor #F8F8F8
start
partition PlayAnimation {
if (Container == null || Documents.Count < 2?) then (да)
stop
endif
if (IsPlaying?) then (да)
stop
endif
:IsPlaying = true;
:_animationFrameIndex = индекс ActiveDocument;
}
partition AdvanceAnimationFrame {
if (Container == null || !IsPlaying?) then (да)
:StopAnimation();
stop
endif
if (Documents.Count == 0?) then (да)
:StopAnimation();
stop
endif
:index %= Count; doc = Documents[index];
:suppress on; ActiveDocument = doc; suppress off;
:RefreshCanvasFor(doc);
:delay = max(FrameDelayMs, 10);
:новый DispatcherTimer(delay);
note right
Tick: Stop timer, index++,
снова AdvanceAnimationFrame
end note
:Start();
}
floating note left
Цикл: каждый Tick на UI-потоке
снова вызывает AdvanceAnimationFrame.
Пауза кадра — FrameDelayMs документа.
end note
stop
legend right
StopAnimation: стоп таймера, IsPlaying=false,
SyncLayersAndCanvas. Команда Stop или
выход из Advance при ошибке состояния.
end legend
@enduml