Flowchart connector is overlapping with node
See original GitHub issueHi, @ajainarayanan, I have a problem like this, the connector is overlapping with the node。
the full settings is:
import { extend, clone } from 'lodash'
// globalTextColor
const globalGrayColor = '#90949c'
const whiteColor = '#fff'
// 基础设置
export const defaultSettings = {
Connector: ['Flowchart', {
alwaysRespectStubs: true,
gap: 4,
cornerRadius: 10,
midpoint: 0.2,
stub: 40
}],
ConnectionsDetachable: true
}
// 是否可 drop
export const dropNotAllowedStyle = {
stroke: 'red',
fill: 'red'
}
// 连接线样式
export const connectorStyle = {
stroke: globalGrayColor,
strokeWidth: 2
}
export const connectorOverlays = {
connectorOverlays: [
['Arrow', { location: 1, length: 6, width: 12, height: 10, foldback: 1 }],
['Label', {
location: 0.5,
id: 'label',
cssClass: 'aLabel',
events: {
click: (info) => console.log(info.label)
}
}]
]
}
export const disabledConnectorOverlays = {
connectorOverlays: [
[ 'Arrow', { location: 1, length: 6, width: 12, height: 10, foldback: 1 } ]
]
}
export const commonSettings = {
endpoint: 'Dot',
maxConnections: -1, // -1 means unlimited connections
allowLoopback: false,
paintStyle: {
stroke: globalGrayColor,
fill: whiteColor,
radius: 4,
lineWidth: 1
},
anchors: ['Static']
}
export const sourceSettings = extend({
isSource: true,
connectorStyle: connectorStyle,
anchor: [1, 0.5, 0, 0, 0, 0]
}, commonSettings, {maxConnections: -1})
export const sinkSettings = extend({
isTarget: true,
anchor: [0, 0.5, 0, 0, 0, 0],
connectorStyle: connectorStyle,
onMaxConnections: function (info, e) {
console.error('Maximum connections (' + info.maxConnections + ') reached') // eslint-disable-line
},
dropOptions: {
// todo: dynamic检测
// hoverClass: 'drop-hover',
activeClass: 'drag-active'
}
}, commonSettings, {maxConnections: -1})
export function getSettings (isDisabled = false) {
let settings = {
transformSource: {},
transformSink: {}
}
if (isDisabled) {
settings = {
default: defaultSettings,
commonSettings: extend(commonSettings, disabledConnectorOverlays),
source: extend(sourceSettings, disabledConnectorOverlays),
sink: extend(sinkSettings, disabledConnectorOverlays),
transformSource: {},
transformSink: {}
}
} else {
settings = {
default: defaultSettings,
commonSettings: extend(commonSettings, connectorOverlays),
source: extend(sourceSettings, connectorOverlays),
sink: extend(sinkSettings, connectorOverlays),
transformSource: {},
transformSink: {}
}
}
settings.transformSource = clone(settings.source)
settings.transformSink = clone(settings.sink)
return settings
}
do you have any advice on this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Flowchart connector is overlapping with node #771 - GitHub
Hi, @sporritt I have a problem like this, the connector is overlapping with the node。 the full settings is: import { extend, ...
Read more >How to avoid connector overlap with Right Angle and Flow ...
I'm trying to create a network map using Right Angle Connectors and LayoutStyle FLOW_CHART + TOP_TO_BOTTOM. I need these connectors to not overlap...
Read more >jsPlumb: how to make Flowchart connectors avoid intersecting ...
Basically you have to add in a zero height/width div to act as an intermediate node. You then make connections to and from...
Read more >Stop Connectors from overlapping in Winforms Diagram Control
We have a particular type of FlowChart where two Decision nodes can be joined with Multiple connector lines. When the charts is layout...
Read more >RadialTree: Nodes & connectors overlapping issue. - Syncfusion
Hi,. Please find attached a sample project to demonstrate the overlapping issue. The issue can be reproduce easily with following conditions ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ajainarayanan yes。It’s not an issue with
react-dag
,and the author of jsplumb have solved my problem。thanks for your awesome project。
hacked a way to add the label.
data
toconnections
, likedata
inConnectionOverlays
, likePlease let me know if there’s a better way. Thanks.