Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor debug logging changes #152

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

// 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 Expand Up @@ -275,7 +276,7 @@
}

// TODO: add missing dependencies
}, [trackManager, dispatchCanvas, canvas.selectedPointIds]);

Check warning on line 279 in src/components/App.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

React Hook useEffect has missing dependencies: 'canvas.fetchedPointIds' and 'updateTracks'. Either include them or remove the dependency array

// playback time points
// TODO: this is basic and may drop frames
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
Loading