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"; @import "~n8n-design-system/theme/dist/index.css";
body { body {
background-color: $--custom-node-view-background; background-color: $--custom-node-view-background;
} }

View file

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