Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
b2baf636
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b2baf636
编写于
1月 20, 2020
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* improve contextmenu in flowchart.
上级
e22cc838
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
15 deletion
+17
-15
docs/examples/flowchart.fsm.js
docs/examples/flowchart.fsm.js
+0
-1
src/js/flowchart.js
src/js/flowchart.js
+17
-14
未找到文件。
docs/examples/flowchart.fsm.js
浏览文件 @
b2baf636
...
...
@@ -242,7 +242,6 @@ if ($.zui.FlowChart) {
$
.
zui
.
FlowChart
.
addPlugin
(
'
fsm
'
,
{
defaultOptions
:
defaultOptions
,
style
:
[
'
.flowchart-contextmenu {min-width: 360px}
'
,
'
.flowchart-contextmenu .col-xs-4 {width: 25%}
'
,
'
#{id} .flowchart-element-fsm_fork, #{id} .flowchart-element-fsm_merge {align-items: flex-start!important;}
'
,
'
#{id} .flowchart-element-FSM_ActState:before {content: " "; position: absolute; width: 30px; height: 30px; top: 4px; left: 4px; background: #888; border-radius: 50%; border: 1px solid #333}
'
...
...
src/js/flowchart.js
浏览文件 @
b2baf636
...
...
@@ -2631,6 +2631,17 @@
e
.
returnValue
=
false
;
return
false
;
});
$
(
document
).
on
(
'
change
'
,
'
.flowchart-
'
+
that
.
id
+
'
-type-selector
'
,
function
()
{
var
$select
=
$
(
this
);
var
nodeID
=
$select
.
data
(
'
id
'
);
var
node
=
that
.
getElement
(
nodeID
);
if
(
node
)
{
node
.
changeType
(
$select
.
val
());
that
.
render
(
node
);
}
$
.
zui
.
ContextMenu
.
hide
();
});
}
$canvas
.
on
(
'
click
'
,
function
(
e
)
{
...
...
@@ -2970,30 +2981,22 @@
}
var
items
=
[];
if
(
!
that
.
options
.
readonly
)
{
var
type
ButtonsHTML
=
[];
var
type
Options
=
[];
$
.
each
(
that
.
types
,
function
(
name
,
typeInfo
)
{
if
((
typeInfo
.
isNode
===
ele
.
isNode
)
&&
!
typeInfo
.
internal
)
{
type
ButtonsHTML
.
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
>
'
);
type
Options
.
push
(
'
<option
'
+
(
ele
.
type
===
name
?
'
selected
'
:
''
)
+
'
value="
'
+
name
+
'
">
'
+
(
typeInfo
.
displayName
||
typeInfo
.
name
)
+
'
</option
>
'
);
}
});
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
">
'
,
type
ButtonsHTML
.
join
(
''
),
'
<div
class="input-group" style="margin: 5px 10px 0 10px; min-width: 170px
">
'
,
'
<span class="
input-group-addon
">
'
+
that
.
lang
.
type
+
'
</span>
'
,
'
<
select class="form-control flowchart-
'
+
that
.
id
+
'
-type-selector" data-id="
'
+
ele
.
id
+
'
">
'
,
type
Options
.
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
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录