Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
0039c1fc
Z
zui
项目概览
易企天创
/
zui
11 个月 前同步成功
通知
6
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
37
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
37
Issue
37
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0039c1fc
编写于
12月 17, 2019
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* improve flowchart.
上级
b0882dfc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
28 deletion
+40
-28
src/js/flowchart.js
src/js/flowchart.js
+40
-28
未找到文件。
src/js/flowchart.js
浏览文件 @
0039c1fc
...
...
@@ -1417,6 +1417,9 @@ if (!Array.prototype.map) {
},
$lines
,
$text
);
$relation
.
css
(
bounds
);
flowChart
.
callCallback
(
'
onRenderRelation
'
,
[
$relation
,
that
]);
that
.
setBounds
(
bounds
);
return
;
};
...
...
@@ -2013,9 +2016,16 @@ if (!Array.prototype.map) {
var
plugins
=
[];
var
addPlugin
=
function
(
pluginName
)
{
var
plugin
=
FlowChart
.
plugins
[
pluginName
];
if
(
!
plugin
)
{
return
false
;
}
if
(
!
pluginsMap
[
pluginName
]
&&
plugin
)
{
if
(
plugin
.
plugins
)
{
plugin
.
plugins
.
forEach
(
addPlugin
);
plugin
.
plugins
.
forEach
(
function
(
pluginRequiredPluginName
)
{
if
(
addPlugin
(
pluginRequiredPluginName
)
===
false
)
{
throw
new
Error
(
'
FlowChart: Plugin "
'
+
pluginRequiredPluginName
+
'
" not found, it required by plugin "
'
+
pluginName
+
'
".
'
);
}
});
}
pluginsMap
[
pluginName
]
=
1
;
plugins
.
push
(
pluginName
);
...
...
@@ -2024,7 +2034,11 @@ if (!Array.prototype.map) {
}
}
};
options
.
plugins
.
forEach
(
addPlugin
);
options
.
plugins
.
forEach
(
function
(
pluginName
)
{
if
(
addPlugin
(
pluginName
)
===
false
)
{
throw
new
Error
(
'
FlowChart: Plugin "
'
+
pluginName
+
'
" not found on init from options("
'
+
options
.
plugins
.
join
(
'
,
'
)
+
'
").
'
);
}
});
$
.
extend
(
true
,
options
,
$container
.
data
(),
initOptions
);
that
.
plugins
=
plugins
;
}
...
...
@@ -2733,33 +2747,31 @@ if (!Array.prototype.map) {
}
var
items
=
[];
if
(
!
that
.
options
.
readonly
)
{
if
(
ele
.
isNode
)
{
var
typeButtonsHTML
=
[];
$
.
each
(
that
.
types
,
function
(
name
,
typeInfo
)
{
if
(
typeInfo
.
isNode
&&
!
typeInfo
.
internal
)
{
typeButtonsHTML
.
push
(
'
<div class="col-xs-4" style="padding: 2px"><a class="btn btn-mini
'
+
(
ele
.
type
===
name
?
'
btn-success
'
:
''
)
+
'
" data-type="
'
+
name
+
'
" style="display: block;">
'
+
(
typeInfo
.
displayName
||
typeInfo
.
name
)
+
'
</a></div>
'
);
}
});
items
.
push
({
id
:
'
type
'
,
html
:
[
'
<div style="padding: 3px 20px; white-space: nowrap;">
'
,
'
<span class="btn btn-mini disabled" style="background: none; border: none;padding: 0">
'
+
that
.
lang
.
type
+
'
</span>
'
,
'
<div class="row">
'
,
typeButtonsHTML
.
join
(
''
),
'
</div>
'
,
'
</div>
'
].
join
(
''
),
onClick
:
function
(
e
)
{
var
$btn
=
$
(
e
.
target
).
closest
(
'
.btn
'
);
var
type
=
$btn
.
data
(
'
type
'
);
if
(
type
!==
ele
.
type
)
{
ele
.
changeType
(
type
);
that
.
render
(
ele
);
}
var
typeButtonsHTML
=
[];
$
.
each
(
that
.
types
,
function
(
name
,
typeInfo
)
{
if
((
typeInfo
.
isNode
===
ele
.
isNode
)
&&
!
typeInfo
.
internal
)
{
typeButtonsHTML
.
push
(
'
<div class="col-xs-4" style="padding: 2px"><a class="btn btn-mini
'
+
(
ele
.
type
===
name
?
'
btn-success
'
:
''
)
+
'
" data-type="
'
+
name
+
'
" style="display: block;">
'
+
(
typeInfo
.
displayName
||
typeInfo
.
name
)
+
'
</a></div>
'
);
}
});
items
.
push
({
id
:
'
type
'
,
html
:
[
'
<div style="padding: 3px 20px; white-space: nowrap;">
'
,
'
<span class="btn btn-mini disabled" style="background: none; border: none;padding: 0">
'
+
that
.
lang
.
type
+
'
</span>
'
,
'
<div class="row">
'
,
typeButtonsHTML
.
join
(
''
),
'
</div>
'
,
'
</div>
'
].
join
(
''
),
onClick
:
function
(
e
)
{
var
$btn
=
$
(
e
.
target
).
closest
(
'
.btn
'
);
var
type
=
$btn
.
data
(
'
type
'
);
if
(
type
!==
ele
.
type
)
{
ele
.
changeType
(
type
);
that
.
render
(
ele
);
}
}
,
'
-
'
);
}
}
}
,
'
-
'
);
items
.
push
({
id
:
'
edit
'
,
label
:
that
.
lang
.
edit
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录