Skip to content

Commit

Permalink
fix: _init function condition fault-tolerant in ScaleOverlayTool (#991)
Browse files Browse the repository at this point in the history
* Update getPixelData.ts

* Update ScaleOverlayTool.ts
  • Loading branch information
baokeyu123 authored Jan 11, 2024
1 parent 0cc7cbc commit f90d6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/tools/src/tools/ScaleOverlayTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool {

addAnnotation(newAnnotation, viewport.element);
annotation = newAnnotation;
} else if (this.editData.annotation.data.viewportId == viewport.id) {
} else if (this.editData.annotation && this.editData.annotation.data.viewportId == viewport.id) {
this.editData.annotation.data.handles.points =
viewportCanvasCornersInWorld;
this.editData.annotation.data.viewportId = viewport.id;
Expand Down

0 comments on commit f90d6c8

Please sign in to comment.