Skip to content

Commit

Permalink
Minor performance optimization
Browse files Browse the repository at this point in the history
Consolidate GeoJSAnnotation manipulation
  • Loading branch information
arjunrajlab committed Nov 30, 2024
1 parent 6d0277b commit 202cc40
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/AnnotationViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,10 @@ export default class AnnotationViewer extends Vue {
AnnotationShape.Point,
[this.unrolledCentroidCoordinates[annotation.id]],
{
// Add metadata for click and connection handling
time: annotation.location.Time,
girderId: annotation.id,
isTimelapsePoint: true,
style: {
scaled: 1, // Fixed size in image coordinates
fill: true,
Expand All @@ -1425,12 +1429,6 @@ export default class AnnotationViewer extends Vue {
);
if (pointAnnotation) {
// Add metadata for click and connection handling
pointAnnotation.options({
time: annotation.location.Time,
girderId: annotation.id,
isTimelapsePoint: true,
});
this.timelapseLayer.addAnnotation(pointAnnotation, undefined, false);
}
});
Expand Down

0 comments on commit 202cc40

Please sign in to comment.