SYNC: auto-detect charts is disabled by default #1145

This commit is contained in:
SPRINX0\prochazka
2025-06-18 09:29:44 +02:00
committed by Diflow
parent a10fe6994a
commit 9bff8608c1
6 changed files with 72 additions and 15 deletions

View File

@@ -80,6 +80,7 @@
label: `Result ${index + 1}`,
isResult: true,
component: JslDataGrid,
resultIndex: info.resultIndex,
props: { jslid: info.jslid, driver, onOpenChart: () => handleOpenChart(info.resultIndex) },
}))),
...charts.map((info, index) => ({
@@ -144,6 +145,21 @@
}
onSetFrontMatterField?.('selected-chart', resultIndex + 1);
}
export function openCurrentChart() {
const currentIndex = domTabs.getValue();
console.log('Current index:', currentIndex);
const currentTab = allTabs[currentIndex];
console.log('Current tab:', currentTab);
if (currentTab?.isChart) {
return;
}
const resultIndex = currentTab?.resultIndex;
console.log('Result index:', resultIndex);
if (resultIndex != null) {
handleOpenChart(resultIndex);
}
}
</script>
<TabControl