@elicdavis/node-flow 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/dist/web/NodeFlow.js +8 -0
- package/dist/web/NodeFlow.js.map +7 -0
- package/package.json +1 -1
- package/src/graph.ts +12 -0
- package/src/index.ts +11 -2
- package/src/notes/subsystem.ts +17 -0
- package/src/utils/string.ts +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5724,6 +5724,9 @@ var NoteSubsystem = class {
|
|
|
5724
5724
|
__privateGet(this, _onNoteAddedCallbacks)[i](note);
|
|
5725
5725
|
}
|
|
5726
5726
|
}
|
|
5727
|
+
getNotes() {
|
|
5728
|
+
return __privateGet(this, _notes);
|
|
5729
|
+
}
|
|
5727
5730
|
addNoteAddedListener(callback) {
|
|
5728
5731
|
if (callback === null || callback === void 0) {
|
|
5729
5732
|
return;
|
|
@@ -5847,6 +5850,17 @@ var NoteSubsystem = class {
|
|
|
5847
5850
|
console.error("no note found to remove");
|
|
5848
5851
|
}
|
|
5849
5852
|
}
|
|
5853
|
+
removeAllNotes() {
|
|
5854
|
+
const notes = __privateGet(this, _notes);
|
|
5855
|
+
__privateSet(this, _notes, []);
|
|
5856
|
+
__privateSet(this, _noteHovering, null);
|
|
5857
|
+
__privateSet(this, _noteSelected, null);
|
|
5858
|
+
for (let i = 0; i < notes.length; i++) {
|
|
5859
|
+
for (let j = 0; j < __privateGet(this, _onNoteRemovedCallbacks).length; j++) {
|
|
5860
|
+
__privateGet(this, _onNoteRemovedCallbacks)[j](notes[i]);
|
|
5861
|
+
}
|
|
5862
|
+
}
|
|
5863
|
+
}
|
|
5850
5864
|
render(ctx, camera, mousePosition) {
|
|
5851
5865
|
__privateSet(this, _noteHovering, null);
|
|
5852
5866
|
__privateSet(this, _hoveringHandle, 0 /* None */);
|
|
@@ -6441,6 +6455,15 @@ var NodeFlowGraph = class {
|
|
|
6441
6455
|
addNote(note) {
|
|
6442
6456
|
__privateGet(this, _mainNoteSubsystem).addNote(note);
|
|
6443
6457
|
}
|
|
6458
|
+
removeNote(note) {
|
|
6459
|
+
__privateGet(this, _mainNoteSubsystem).removeNote(note);
|
|
6460
|
+
}
|
|
6461
|
+
removeAllNotes() {
|
|
6462
|
+
__privateGet(this, _mainNoteSubsystem).removeAllNotes();
|
|
6463
|
+
}
|
|
6464
|
+
getNotes() {
|
|
6465
|
+
return __privateGet(this, _mainNoteSubsystem).getNotes();
|
|
6466
|
+
}
|
|
6444
6467
|
addOnNodeCreatedListener(callback) {
|
|
6445
6468
|
__privateGet(this, _mainNodeSubsystem).addOnNodeCreatedListener(callback);
|
|
6446
6469
|
}
|