From 1b4ad48519317672b33e6602ae47afa12bbe0bd1 Mon Sep 17 00:00:00 2001 From: wrbrant Date: Tue, 29 Oct 2024 08:46:51 -0500 Subject: [PATCH] fixed export all button --- src/main.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 775314a5..72399878 100644 --- a/src/main.ts +++ b/src/main.ts @@ -195,11 +195,11 @@ export class Main { }); // EXPORT - const exportCb = () => { + const exportCb = (cyQuery: string) => { const bundle_id = 'bundle--' + uuid.v4(); const bundle: BundleType = { type: 'bundle', id: bundle_id, objects: [] } as any; - const nodes = window.cycore.$(':selected'); + const nodes = window.cycore.$(cyQuery); nodes.each((ele) => { if (ele.length === 0) { return; @@ -212,8 +212,8 @@ export class Main { openBundleExport(bundle); }; - $('#dd-exportSelected').on('click', exportCb); - $('#dd-exportGraph').on('click', exportCb); + $('#dd-exportSelected').on('click', ()=>exportCb(":selected")); + $('#dd-exportGraph').on('click', ()=>exportCb(":visible")); $('#dd-exportAll').on('click', () => { const bundle_id = 'bundle--' + uuid.v4(); const bundle: BundleType = { type: 'bundle', id: bundle_id, objects: [] } as any;