update connector styling

This commit is contained in:
Mutasem 2021-10-13 10:00:36 +02:00
parent c449879460
commit 1c961d4b0b
2 changed files with 12 additions and 1 deletions

View file

@ -2,6 +2,7 @@
@import "~n8n-design-system/theme/dist/index.css";
body {
background-color: $--custom-node-view-background;
}

View file

@ -1335,7 +1335,7 @@ export default mixins(
];
this.instance.importDefaults({
Connector: ['Flowchart', { cornerRadius: 8, stub: 60, gap: 5, alwaysRespectStubs: false}],
Connector: ['Bezier', { curviness: 150 }],
Endpoint: ['Dot', { radius: 5 }],
DragOptions: { cursor: 'pointer', zIndex: 5000 },
PaintStyle: { strokeWidth: 2, stroke: getStyleTokenValue('--color-foreground-dark') },
@ -1362,6 +1362,16 @@ export default mixins(
});
this.instance.bind('connection', (info: OnConnectionBindInfo) => {
info.connection.setConnector(['Flowchart', { cornerRadius: 8, stub: 60, gap: 5, alwaysRespectStubs: false}]);
info.connection.addOverlay([
'Arrow',
{
location: 1,
width: 12,
foldback: 1,
length: 10,
},
]);
// @ts-ignore
const sourceInfo = info.sourceEndpoint.getParameters();
// @ts-ignore