diff --git a/main.ts b/main.ts index 057953c..b09843f 100644 --- a/main.ts +++ b/main.ts @@ -1504,14 +1504,14 @@ class ScGraphItemView extends ItemView { return true; // return all connections } else { // If connectionType is block, return true if connection is a SmartBlock, otherwise return false - return (this.connectionType === 'block') === (connection instanceof this.env.item_types.SmartBlock); + return (this.connectionType === 'block') === (connection.item instanceof this.env.item_types.SmartBlock); } }); // console.log('Filtered connections:', filteredConnections); filteredConnections.forEach((connection: any, index: any) => { // console.log('Filtered connection:', connection, 'Index:', index); - if (connection && connection.key) { - const connectionId = connection.key; + if (connection && connection.item && connection.item.key) { + const connectionId = connection.item.key; // console.log('Adding connection node for ID:', connectionId); this.addConnectionNode(connectionId, connection); @@ -1531,12 +1531,12 @@ class ScGraphItemView extends ItemView { this.nodes.push({ id: connectionId, name: connectionId, - group: (connection instanceof this.env.item_types.SmartBlock) ? 'block' : 'note', + group: (connection.item instanceof this.env.item_types.SmartBlock) ? 'block' : 'note', x: Math.random() * 1000, y: Math.random() * 1000, fx: null, fy: null, - fill: (connection instanceof this.env.item_types.SmartBlock) ? this.blockFillColor : this.noteFillColor, + fill: (connection.item instanceof this.env.item_types.SmartBlock) ? this.blockFillColor : this.noteFillColor, selected: false, highlighted: false }); diff --git a/manifest.json b/manifest.json index ce76b42..2d008f3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "smart-connections-visualizer", "name": "Smart Connections Visualizer", - "version": "1.0.18", + "version": "1.0.19", "minAppVersion": "0.15.0", "description": "View your Smart Connections in a visualized format.", "author": "Evan Moscoso", diff --git a/package-lock.json b/package-lock.json index 53079b7..1005ab7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "smart-connections-visualizer", - "version": "1.0.12", + "version": "1.0.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "smart-connections-visualizer", - "version": "1.0.12", + "version": "1.0.18", "license": "MIT", "dependencies": { "bootstrap": "^5.3.3", diff --git a/package.json b/package.json index 5aa3ef2..139cf0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smart-connections-visualizer", - "version": "1.0.18", + "version": "1.0.19", "description": "A plugin that allows you to view your Smart Connections in a visualized format.", "main": "main.js", "scripts": {