mirror of
https://github.com/mossy1022/Smart-Connections-Visualizer.git
synced 2026-07-22 10:20:27 +00:00
Updated new connection access from Smart Connections to resolve no nodes bug
This commit is contained in:
parent
084891cee1
commit
527725ee99
4 changed files with 9 additions and 9 deletions
10
main.ts
10
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
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue