提交 a12dd163 编写于 作者: C Catouse

* change flowchart example.

上级 47c29e0b
......@@ -14,6 +14,7 @@
<body style="padding: 20px">
<div style="margin-bottom: 20px">
<button type="button" class="btn btn-primary" id="exportDataBtn">导出数据</button>
<button type="button" class="btn btn-primary" id="showExampleBtn">重置为示例数据</button>
<button type="button" class="btn btn-danger" id="resetDataBtn">重置数据</button>
<button type="button" class="btn" id="resetLayoutBtn">重置布局</button>
</div>
......@@ -103,7 +104,7 @@
$('#flowchart').flowChart({
showRelationTextOnSide: false,
adsorptionGrid: 10,
data: data,
// data: data,
});
var flowchart = $('#flowchart').data('zui.flowChart');
$('#resetLayoutBtn').on('click', function() {
......@@ -118,6 +119,9 @@
message: '<pre><code>' + JSON.stringify(flowchart.exportData(), null, 4) + '</code></pre>'
});
});
$('#showExampleBtn').on('click', function() {
flowchart.resetData(data);
});
console.log(flowchart);
});
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册