|
@ -10,6 +10,8 @@ const props = defineProps({ |
|
|
type: Object, |
|
|
type: Object, |
|
|
default: () => {} |
|
|
default: () => {} |
|
|
}, |
|
|
}, |
|
|
|
|
|
type: String, |
|
|
|
|
|
default:()=>"" |
|
|
}) |
|
|
}) |
|
|
const g6data = ref([]) |
|
|
const g6data = ref([]) |
|
|
|
|
|
|
|
@ -207,7 +209,6 @@ function initG6() { |
|
|
|
|
|
|
|
|
if (!targetNode.collapsed && targetIndex > targetStartIndex - 1) { |
|
|
if (!targetNode.collapsed && targetIndex > targetStartIndex - 1) { |
|
|
targetY = (targetIndex - targetStartIndex + 0.5) * itemHeight + 30; |
|
|
targetY = (targetIndex - targetStartIndex + 0.5) * itemHeight + 30; |
|
|
targetY = Math.min(targetY, 80); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const startPoint = { |
|
|
const startPoint = { |
|
@ -237,7 +238,7 @@ function initG6() { |
|
|
endPoint.y, |
|
|
endPoint.y, |
|
|
], |
|
|
], |
|
|
], |
|
|
], |
|
|
endArrow: cfg.endArrow, |
|
|
endArrow: props.type === 'er'? {path:G6.Arrow.triangle(10,-10,6),fill:'#5B8FF9'} : false//cfg.endArrow, |
|
|
}, |
|
|
}, |
|
|
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type |
|
|
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type |
|
|
name: "path-shape", |
|
|
name: "path-shape", |
|
@ -262,7 +263,7 @@ function initG6() { |
|
|
endPoint.y, |
|
|
endPoint.y, |
|
|
], |
|
|
], |
|
|
], |
|
|
], |
|
|
endArrow: cfg.endArrow, |
|
|
endArrow: props.type === 'er'? {path: G6.Arrow.triangle(10,-10,6),fill:'#5B8FF9'} : false//cfg.endArrow, |
|
|
}, |
|
|
}, |
|
|
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type |
|
|
// must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type |
|
|
name: "path-shape", |
|
|
name: "path-shape", |
|
@ -614,7 +615,7 @@ function initG6() { |
|
|
style: { |
|
|
style: { |
|
|
stroke: '#e2e2e2', |
|
|
stroke: '#e2e2e2', |
|
|
lineWidth: 4, |
|
|
lineWidth: 4, |
|
|
endArrow: true, |
|
|
endArrow: {path: G6.Arrow.triangle(10,-10,6),fill:'#5B8FF9'}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
modes: { |
|
|
modes: { |
|
|