fix: correct DrakonWidget node types (branch→action→question→end)

This commit is contained in:
neo committed 2026-06-23 17:23:24 +05:00
1 parent 818b8c2528
commit 5e692733b7
1 file changed
+54 -31
+54 -31
View File
@@ -1354,20 +1354,62 @@ document.querySelectorAll('a[href^="#"]').forEach((a) => {
// ============================================
// DRAKON DIAGRAM — DrakonWidget (view mode)
// ============================================
// DrakonWidget node types: end, action, question, branch, insertion, address,
// select, case, loopbegin, loopend, parbegin, parend, duration
// Flow direction: entry branch (branchId:0) → ... → end (terminator)
function initDrakonDiagram() {
// Business process: Client → Audit → Drakon diagram → Done
// Business process diagram — client onboarding flow
var diagram = {
name: "Наш процесс",
items: {
"1": { type: "begin", content: "Начало" },
"2": { type: "action", one: "3", content: "Брифинг клиента" },
"3": { type: "action", one: "4", content: "Аудит процессов" },
"4": { type: "question", one: "5", no: "6", content: "Понятно?" },
"5": { type: "action", one: "8", content: "Создание схем ДРАКОН" },
"6": { type: "action", one: "7", content: "Уточняем процесс" },
"7": { type: "address", one: "4", content: "Возврат к этапу" },
"8": { type: "action", one: "9", content: "Согласование" },
"9": { type: "end", content: "Готово" }
// Entry point (arrow icon)
"1": {
type: "branch",
branchId: 0,
one: "2"
},
// Step 1
"2": {
type: "action",
one: "3",
content: "Брифинг клиента"
},
// Step 2
"3": {
type: "action",
one: "4",
content: "Аудит процессов"
},
// Decision
"4": {
type: "question",
one: "5",
no: "6",
content: "Понятно?"
},
// Yes path — proceed
"5": {
type: "action",
one: "7",
content: "Создание схем ДРАКОН"
},
// No path — clarify
"6": {
type: "action",
one: "7",
content: "Уточняем процесс"
},
// Merge
"7": {
type: "action",
one: "8",
content: "Согласование"
},
// End — terminator
"8": {
type: "end"
}
}
};
@@ -1380,7 +1422,7 @@ function initDrakonDiagram() {
theme: {
lineWidth: 2,
borderWidth: 0,
background: "#fafbfc",
background: "#ffffff",
iconBorder: "#d1d5db",
iconBack: "#ffffff",
iconRadius: 6,
@@ -1392,26 +1434,7 @@ function initDrakonDiagram() {
font: "14px Inter, sans-serif",
headerFont: "bold 15px Inter, sans-serif",
yes: "Да",
no: "Нет",
icons: {
question: {
iconBack: "#fef3c7",
iconBorder: "#f59e0b",
color: "#92400e",
borderWidth: 1
},
begin: {
iconBack: "#dcfce7",
iconBorder: "#16a34a",
color: "#15803d",
borderWidth: 1
},
end: {
iconBack: "#f3f4f6",
iconBorder: "#9ca3af",
borderWidth: 1
}
}
no: "Нет"
}
};