Skip to content

Commit

Permalink
增加网关类型
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhaolong committed Sep 19, 2019
1 parent 0f93c26 commit f5baa16
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/components/DetailPanel/GatewayDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import LangContext from "../../util/context";

const GatewayDetail = ({model,onChange,readOnly = false,}) => {
const { i18n } = useContext(LangContext);
const title = i18n['exclusiveGateway'];
const title = model.clazz === 'exclusiveGateway' || model.clazz === 'gateway' ? i18n['exclusiveGateway']
: model.clazz === 'parallelGateway' ? i18n['parallelGateway'] : i18n['inclusiveGateway'];
return (
<div data-clazz={model.clazz}>
<div className={styles.panelTitle}>{title}</div>
Expand Down
10 changes: 8 additions & 2 deletions src/components/ItemPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ const ItemPanel = forwardRef(({height},ref) => {
<div>{i18n['receiveTask']}</div>
</Panel>
<Panel header={i18n['gateway']} key="3" forceRender>
<img data-item="{clazz:'gateway',size:'40*40',label:''}"
src={require('../assets/flow/gateway.svg')} style={{width: 48, height: 48}}/>
<img data-item="{clazz:'exclusiveGateway',size:'40*40',label:''}"
src={require('../assets/flow/exclusive-gateway.svg')} style={{width: 48, height: 48}}/>
<div>{i18n['exclusiveGateway']}</div>
<img data-item="{clazz:'parallelGateway',size:'40*40',label:''}"
src={require('../assets/flow/parallel-gateway.svg')} style={{width: 48, height: 48}}/>
<div>{i18n['parallelGateway']}</div>
<img data-item="{clazz:'inclusiveGateway',size:'40*40',label:''}"
src={require('../assets/flow/inclusive-gateway.svg')} style={{width: 48, height: 48}}/>
<div>{i18n['inclusiveGateway']}</div>
</Panel>
<Panel header={i18n['catch']} key="4" forceRender>
<img data-item={"{clazz:'timerCatch',size:'50*30',label:''}"}
Expand Down
18 changes: 9 additions & 9 deletions src/item/flowNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export default function(G6) {
group.icon = group.addShape('path', {
attrs: {
path: [
['M', -6, -6],
['L', 6, 6],
['M', -8, -8],
['L', 8, 8],
['Z'],
['M', 6, -6],
['L', -6, 6],
['M', 8, -8],
['L', -8, 8],
['Z']
],
lineWidth: 2,
Expand All @@ -87,11 +87,11 @@ export default function(G6) {
group.icon = group.addShape('path', {
attrs: {
path: [
['M', 0, -6],
['L', 0, 6],
['M', 0, -10],
['L', 0, 10],
['Z'],
['M', -6, 0],
['L', 6, 0],
['M', -10, 0],
['L', 10, 0],
['Z']
],
lineWidth: 2,
Expand All @@ -108,7 +108,7 @@ export default function(G6) {
attrs: {
x: 0,
y: 0,
r: 8,
r: 10,
lineWidth: 2,
stroke: this.borderColor,
}
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default {
'messageEvent.message': 'Message',
'signalEvent': 'Signal Event',
'signalEvent.signal': 'Signal',
'exclusiveGateway': 'Gateway',
'sequenceFlow': 'Sequence Flow',
'sequenceFlow.expression': 'Expression',
'sequenceFlow.seq': 'Sequence',
Expand All @@ -44,6 +43,9 @@ export default {
'start': 'Start Events',
'end': 'End Events',
'gateway': 'Gateway',
'exclusiveGateway': 'Exclusive Gateway',
'parallelGateway': 'Parallel Gateway',
'inclusiveGateway': 'Inclusive Gateway',
'task': 'Task',
'catch': 'Catching Event',
'tooltip.undo': 'Undo',
Expand Down
4 changes: 3 additions & 1 deletion src/locales/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default {
'messageEvent.message': '消息名',
'signalEvent': '信号节点',
'signalEvent.signal': '信号名',
'exclusiveGateway': '网关节点',
'sequenceFlow': '连接线',
'sequenceFlow.expression': '条件表达式',
'sequenceFlow.seq': '序号',
Expand All @@ -44,6 +43,9 @@ export default {
'start': '开始事件',
'end': '结束事件',
'gateway': '网关',
'exclusiveGateway': '排他网关',
'parallelGateway': '并行网关',
'inclusiveGateway': '包容网关',
'task': '活动',
'catch': '捕获事件',
'tooltip.undo': '撤销',
Expand Down

0 comments on commit f5baa16

Please sign in to comment.