Canvas: Address connection vertex bug (#85026)

This commit is contained in:
Nathan Marrs
2024-03-26 10:02:34 +00:00
committed by Ashley Harrison
parent 99661056b1
commit d7a94af7d7
@@ -392,7 +392,7 @@ export class Connections {
const vertexIndex = this.selectedVertexIndex;
if (connectionIndex !== undefined && vertexIndex !== undefined) {
const currentSource = this.scene.connections.state[connectionIndex].source;
const currentSource = this.selection.value!.source;
if (currentSource.options.connections) {
const currentConnections = [...currentSource.options.connections];
if (currentConnections[connectionIndex].vertices) {
@@ -521,7 +521,7 @@ export class Connections {
const vertexIndex = this.selectedVertexIndex;
if (connectionIndex !== undefined && vertexIndex !== undefined) {
const currentSource = this.scene.connections.state[connectionIndex].source;
const currentSource = this.selection.value!.source;
if (currentSource.options.connections) {
const currentConnections = [...currentSource.options.connections];
const newVertex = { x: (x - x1) / (x2 - x1), y: (y - y1) / (y2 - y1) };