diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 5a82f4a922..39dc3f8ed0 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -27,6 +27,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - When loading data from a data layer that has data stored beyond the bounding box specified in the datasource-properties.json, data outside of the bounding box is now zeroed. (the layer is “clipped”). [#8551](https://github.com/scalableminds/webknossos/pull/8551) - Updated to Typescript from version `5.5` to `5.8`. [#8613](https://github.com/scalableminds/webknossos/pull/8613) - Updated Voxelytics log streaming to also include the `log_path` attribute. [#8615](https://github.com/scalableminds/webknossos/pull/8615) +- When creating or uploading a non-task volume annotation layer with a fallback segmentation layer, the annotation layer’s bounding box will now be limited to that layer’s, instead of the whole dataset’s. [#7580](https://github.com/scalableminds/webknossos/pull/7580) ### Fixed - When selecting a skeleton node in a viewport, its tree is focused and scrolled to in the skeleton tab, even if its parent group was collapsed before. [#8585](https://github.com/scalableminds/webknossos/pull/8585) diff --git a/app/controllers/AnnotationIOController.scala b/app/controllers/AnnotationIOController.scala index 542fa91b31..dd5d295e3d 100755 --- a/app/controllers/AnnotationIOController.scala +++ b/app/controllers/AnnotationIOController.scala @@ -332,7 +332,8 @@ class AnnotationIOController @Inject()( case _ => None }.headOption val bbox = - if (volumeTracing.boundingBox.isEmpty) boundingBoxToProto(dataSource.boundingBox) + if (volumeTracing.boundingBox.isEmpty) + boundingBoxToProto(fallbackLayerOpt.map(_.boundingBox).getOrElse(dataSource.boundingBox)) else volumeTracing.boundingBox for { diff --git a/app/models/annotation/AnnotationService.scala b/app/models/annotation/AnnotationService.scala index 50ae0776a6..00f4e52837 100755 --- a/app/models/annotation/AnnotationService.scala +++ b/app/models/annotation/AnnotationService.scala @@ -147,7 +147,7 @@ class AnnotationService @Inject()( } yield VolumeTracing( None, - boundingBoxToProto(boundingBox.getOrElse(dataSource.boundingBox)), + boundingBoxToProto(boundingBox.orElse(fallbackLayer.map(_.boundingBox)).getOrElse(dataSource.boundingBox)), System.currentTimeMillis(), dataSource.id.directoryName, vec3IntToProto(startPosition.getOrElse(dataSource.center)),