Skip to content

Commit

Permalink
minor debug changes (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeunHuijben authored Dec 6, 2024
1 parent 0d7df4e commit 2527514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/PointCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2527514

Please sign in to comment.