diff --git a/src/services/newConnection/ConnectionService.ts b/src/services/newConnection/ConnectionService.ts index d51b44e..7f4f0bb 100644 --- a/src/services/newConnection/ConnectionService.ts +++ b/src/services/newConnection/ConnectionService.ts @@ -77,10 +77,10 @@ export class ConnectionService extends Emitter { return; } if ( - (this.graph.rootStore.settings.getConfigFlag("useBlocksAnchors") && target instanceof Anchor) || - (isShiftKeyEvent(event) && - isBlock(target) && - this.graph.rootStore.settings.getConfigFlag("canCreateNewConnections")) + ( + (this.graph.rootStore.settings.getConfigFlag("useBlocksAnchors") && target instanceof Anchor) || + (isShiftKeyEvent(event) && isBlock(target)) + ) && this.graph.rootStore.settings.getConfigFlag("canCreateNewConnections") ) { nativeEvent.preventDefault(); nativeEvent.stopPropagation(); diff --git a/src/stories/Playground/GraphPlayground.tsx b/src/stories/Playground/GraphPlayground.tsx index f066791..979ce3d 100644 --- a/src/stories/Playground/GraphPlayground.tsx +++ b/src/stories/Playground/GraphPlayground.tsx @@ -73,7 +73,7 @@ const config: HookGraphParams = { canZoomCamera: true, canDuplicateBlocks: false, canChangeBlockGeometry: ECanChangeBlockGeometry.ALL, - canCreateNewConnections: false, + canCreateNewConnections: true, showConnectionArrows: false, scaleFontSize: 1, useBezierConnections: true,