未验证 提交 3b714b15 编写于 作者: X xingchun-chen 提交者: GitHub

Merge pull request #3572 from break60/dev

[fix-3553][ui]Repair click workflow connection, select the entire path
...@@ -208,7 +208,6 @@ ...@@ -208,7 +208,6 @@
], ],
Connector: 'Bezier', Connector: 'Bezier',
PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style
HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3},
ConnectionOverlays: [ ConnectionOverlays: [
[ [
'Arrow', 'Arrow',
...@@ -832,7 +831,6 @@ ...@@ -832,7 +831,6 @@
], ],
Connector: 'Bezier', Connector: 'Bezier',
PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style PaintStyle: { lineWidth: 2, stroke: '#456' }, // Connection style
HoverPaintStyle: {stroke: '#ccc', strokeWidth: 3},
ConnectionOverlays: [ ConnectionOverlays: [
[ [
'Arrow', 'Arrow',
......
...@@ -100,13 +100,27 @@ const setSvgColor = (e, color) => { ...@@ -100,13 +100,27 @@ const setSvgColor = (e, color) => {
// Traverse clear all colors // Traverse clear all colors
$('.jtk-connector').each((i, o) => { $('.jtk-connector').each((i, o) => {
_.map($(o)[0].childNodes, v => { _.map($(o)[0].childNodes, v => {
$(v).attr('fill', '#2d8cf0').attr('stroke', '#2d8cf0').attr('stroke-width', 2) if($(v).attr('fill') ==='#ccc') {
$(v).attr('fill', '#2d8cf0')
}
if($(v).attr('fill') ==='#4caf50') {
$(v).attr('fill','#4caf50').attr('stroke', '#4caf50').attr('stroke-width', 2)
$(v).prev().attr('stroke', '#4caf50').attr('stroke-width', 2)
} else if($(v).attr('fill') ==='#252d39') {
$(v).attr('stroke', '#252d39').attr('stroke-width', 2)
$(v).prev().attr('stroke', '#252d39').attr('stroke-width', 2)
} else {
$(v).attr('stroke', '#2d8cf0').attr('stroke-width', 2)
}
}) })
}) })
// Add color to the selection // Add color to the selection
_.map($(e.canvas)[0].childNodes, (v, i) => { _.map($(e.canvas)[0].childNodes, (v, i) => {
$(v).attr('fill', color).attr('stroke', color) if($(v).attr('fill') ==='#2d8cf0') {
$(v).attr('fill', '#ccc')
}
$(v).attr('stroke', '#ccc')
if ($(v).attr('class')) { if ($(v).attr('class')) {
$(v).attr('stroke-width', 2) $(v).attr('stroke-width', 2)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册