From 2527514317d09244c7b06c723def467509a8aa93 Mon Sep 17 00:00:00 2001 From: Teun Huijben <45037215+TeunHuijben@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:17:37 -0800 Subject: [PATCH] minor debug changes (#152) --- src/components/App.tsx | 1 + src/lib/PointCanvas.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 4373032..521f90a 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -181,6 +181,7 @@ export default function App() { // update the array when the dataUrl changes useEffect(() => { + console.debug("effect-dataUrl"); const trackManager = loadTrackManager(dataUrl); // TODO: add clean-up by returning another closure trackManager.then((tm: TrackManager | null) => { diff --git a/src/lib/PointCanvas.ts b/src/lib/PointCanvas.ts index 283f8f3..8440a8d 100644 --- a/src/lib/PointCanvas.ts +++ b/src/lib/PointCanvas.ts @@ -233,12 +233,13 @@ export class PointCanvas { if (ndim == 2) { this.controls.enableRotate = false; + console.debug("Rotation locked because 2D datast detected"); } else if (ndim == 3) { this.controls.enableRotate = true; + console.debug("Rotation enabled because 3D datast detected"); } else { console.error("Invalid ndim value: " + ndim); } - console.debug("Rotation locked because 2D datast detected"); } // ran upon new data load @@ -411,6 +412,7 @@ export class PointCanvas { const num = numberOfValuesPerPoint; // if the point size is the initial point size and radius is provided, then we need to calculate the mean cell size once + // ToDo: this goes wrong when a dataset without pointsize is loaded after a dataset with pointsize (because we go from num=4 to num3, but this function runs before trackManager is loaded) if (num == 4 && this.pointSize == initialPointSize) { this.pointSize = this.calculateMeanCellSize(data, numPoints, num); console.debug("mean cell size calculated: ", this.pointSize);