From 278b548133f2c7443e3710f27e470531fdc0175d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BC=C3=9Femeyer?= Date: Tue, 12 Nov 2024 12:36:55 +0100 Subject: [PATCH 1/2] fix server node type by switching back to mag --- .../oxalis/model/helpers/generate_dummy_trees.ts | 2 +- .../model/reducers/skeletontracing_reducer_helpers.ts | 2 +- .../test/fixtures/skeletontracing_server_objects.ts | 6 +++--- .../javascripts/test/fixtures/tasktracing_server_objects.ts | 2 +- frontend/javascripts/types/api_flow_types.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/javascripts/oxalis/model/helpers/generate_dummy_trees.ts b/frontend/javascripts/oxalis/model/helpers/generate_dummy_trees.ts index 3d48d91c3f..3ed8d9b417 100644 --- a/frontend/javascripts/oxalis/model/helpers/generate_dummy_trees.ts +++ b/frontend/javascripts/oxalis/model/helpers/generate_dummy_trees.ts @@ -34,7 +34,7 @@ export default function generateDummyTrees( }, radius: 112.39999389648438, viewport: 1, - resolution: 1, + mag: 1, bitDepth: 4, interpolation: true, createdTimestamp: 1507550793899, diff --git a/frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts b/frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts index 4570c1d437..784a14a134 100644 --- a/frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts +++ b/frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.ts @@ -846,7 +846,7 @@ function serverNodeToMutableNode(n: ServerNode): MutableNode { rotation: Utils.point3ToVector3(n.rotation), bitDepth: n.bitDepth, viewport: n.viewport, - resolution: n.resolution, + resolution: n.mag, radius: n.radius, timestamp: n.createdTimestamp, interpolation: n.interpolation, diff --git a/frontend/javascripts/test/fixtures/skeletontracing_server_objects.ts b/frontend/javascripts/test/fixtures/skeletontracing_server_objects.ts index 55a2c1fa71..cbcec2723a 100644 --- a/frontend/javascripts/test/fixtures/skeletontracing_server_objects.ts +++ b/frontend/javascripts/test/fixtures/skeletontracing_server_objects.ts @@ -22,7 +22,7 @@ export const tracing: ServerSkeletonTracing = { }, radius: 112.39999389648438, viewport: 0, - resolution: 1, + mag: 1, bitDepth: 4, interpolation: true, createdTimestamp: 1502302785450, @@ -70,7 +70,7 @@ export const tracing: ServerSkeletonTracing = { }, radius: 112.39999389648438, viewport: 0, - resolution: 1, + mag: 1, bitDepth: 4, interpolation: true, createdTimestamp: 1502302785447, @@ -90,7 +90,7 @@ export const tracing: ServerSkeletonTracing = { }, radius: 112.39999389648438, viewport: 0, - resolution: 1, + mag: 1, bitDepth: 4, interpolation: true, createdTimestamp: 1502302785448, diff --git a/frontend/javascripts/test/fixtures/tasktracing_server_objects.ts b/frontend/javascripts/test/fixtures/tasktracing_server_objects.ts index 8da34fd036..cd1d0d08f2 100644 --- a/frontend/javascripts/test/fixtures/tasktracing_server_objects.ts +++ b/frontend/javascripts/test/fixtures/tasktracing_server_objects.ts @@ -20,7 +20,7 @@ export const tracing: ServerSkeletonTracing = { }, radius: 120, viewport: 1, - resolution: 1, + mag: 1, bitDepth: 0, interpolation: false, createdTimestamp: 1528811979356, diff --git a/frontend/javascripts/types/api_flow_types.ts b/frontend/javascripts/types/api_flow_types.ts index c27d335669..a4c6df351f 100644 --- a/frontend/javascripts/types/api_flow_types.ts +++ b/frontend/javascripts/types/api_flow_types.ts @@ -756,7 +756,7 @@ export type ServerNode = { rotation: Point3; bitDepth: number; viewport: number; - resolution: number; + mag: number; radius: number; createdTimestamp: number; interpolation: boolean; From de63a3a3fe5dd428e358dddda0970d2fb5fb2f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BC=C3=9Femeyer?= Date: Tue, 12 Nov 2024 12:43:24 +0100 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 9317f6f652..ffdd320c19 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -45,6 +45,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Deleting a bounding box is now possible independently of a visible segmentation layer. [#8164](https://github.com/scalableminds/webknossos/pull/8164) - S3-compliant object storages can now be accessed via HTTPS. [#8167](https://github.com/scalableminds/webknossos/pull/8167) - Fixed that skeleton tree nodes were created with the wrong mag. [#8185](https://github.com/scalableminds/webknossos/pull/8185) +- Fixed the expected type of a tree node received from the server. Fixes nml export to include the `inMag` field correctly. [#8187](https://github.com/scalableminds/webknossos/pull/8187) - Fixed a layout persistence bug leading to empty viewports, triggered when switching between orthogonal, flight, or oblique mode. [#8177](https://github.com/scalableminds/webknossos/pull/8177) ### Removed