Skip to content

Commit b4f3015

Browse files
committed
NXT-4294: skip call of WebGL-only method in SVG canvas renderer
NXT-4294 (Creating connection bendpoints causes an unhandled error in SVG canvas)
1 parent d6472ea commit b4f3015

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

org.knime.ui.js/src/store/workflow/connectionInteractions.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { API } from "@api";
22
import { defineStore } from "pinia";
33

44
import type { Connection, XY } from "@/api/gateway-api/generated-api";
5+
import { canvasRendererUtils } from "@/components/workflowEditor/util/canvasRenderer";
56

67
import { useMovingStore } from "./moving";
78
import { useWorkflowStore } from "./workflow";
@@ -92,9 +93,13 @@ export const useConnectionInteractionsStore = defineStore(
9293
index,
9394
});
9495

95-
// move new bendpoint
9696
const movingStore = useMovingStore();
97-
await movingStore.moveObjectsWebGL({ ...movingStore.movePreviewDelta });
97+
if (canvasRendererUtils.isWebGLRenderer()) {
98+
// move new bendpoint
99+
await movingStore.moveObjectsWebGL({
100+
...movingStore.movePreviewDelta,
101+
});
102+
}
98103

99104
this.removeVirtualBendpoint({ connectionId, index });
100105
},

0 commit comments

Comments
 (0)