fix: correct DrakonWidget node types (branch→action→question→end)
This commit is contained in:
1 parent
818b8c2528
commit
5e692733b7
1 file changed
+54
-31
+54
-31
@@ -1354,20 +1354,62 @@ document.querySelectorAll('a[href^="#"]').forEach((a) => {
|
|||||||
// ============================================
|
// ============================================
|
||||||
// DRAKON DIAGRAM — DrakonWidget (view mode)
|
// 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() {
|
function initDrakonDiagram() {
|
||||||
// Business process: Client → Audit → Drakon diagram → Done
|
// Business process diagram — client onboarding flow
|
||||||
var diagram = {
|
var diagram = {
|
||||||
name: "Наш процесс",
|
name: "Наш процесс",
|
||||||
items: {
|
items: {
|
||||||
"1": { type: "begin", content: "Начало" },
|
// Entry point (arrow icon)
|
||||||
"2": { type: "action", one: "3", content: "Брифинг клиента" },
|
"1": {
|
||||||
"3": { type: "action", one: "4", content: "Аудит процессов" },
|
type: "branch",
|
||||||
"4": { type: "question", one: "5", no: "6", content: "Понятно?" },
|
branchId: 0,
|
||||||
"5": { type: "action", one: "8", content: "Создание схем ДРАКОН" },
|
one: "2"
|
||||||
"6": { type: "action", one: "7", content: "Уточняем процесс" },
|
},
|
||||||
"7": { type: "address", one: "4", content: "Возврат к этапу" },
|
// Step 1
|
||||||
"8": { type: "action", one: "9", content: "Согласование" },
|
"2": {
|
||||||
"9": { type: "end", content: "Готово" }
|
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: {
|
theme: {
|
||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
background: "#fafbfc",
|
background: "#ffffff",
|
||||||
iconBorder: "#d1d5db",
|
iconBorder: "#d1d5db",
|
||||||
iconBack: "#ffffff",
|
iconBack: "#ffffff",
|
||||||
iconRadius: 6,
|
iconRadius: 6,
|
||||||
@@ -1392,26 +1434,7 @@ function initDrakonDiagram() {
|
|||||||
font: "14px Inter, sans-serif",
|
font: "14px Inter, sans-serif",
|
||||||
headerFont: "bold 15px Inter, sans-serif",
|
headerFont: "bold 15px Inter, sans-serif",
|
||||||
yes: "Да",
|
yes: "Да",
|
||||||
no: "Нет",
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user