-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactions.ts
More file actions
34 lines (28 loc) · 1.14 KB
/
actions.ts
File metadata and controls
34 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type { BoundaryStrategy } from './utils.ts';
export type UpdateRoiOptions =
| UpdateRoiOptionsNoCommit
| UpdateRoiOptionsWithCommit;
export interface UpdateRoiOptionsNoCommit {
/**
* Whether the update should be committed immediately.
* In both cases, the ROI will move immediately on screen.
* If set to false, the ROI will enter a mode where it can't be modified through user interactions until committed.
* Setting it to false also prevents having frequent updates to committed ROIs when those can trigger expensive operations.
*/
commit: false;
}
// The inside_auto strategy is excluded because it requires to know about the nature of the action (move, resize, etc.).
export type UpdateRoiOptionsBoundaryStrategy = Exclude<
BoundaryStrategy,
'inside_auto'
>;
export interface UpdateRoiOptionsWithCommit {
commit: true;
boundaryStrategy?: UpdateRoiOptionsBoundaryStrategy;
}
export type XRotationCenter = 'left' | 'right' | 'center';
export type YRotationCenter = 'top' | 'bottom' | 'center';
export type UpdateRoiAngleOptions = UpdateRoiOptions & {
xRotationCenter: XRotationCenter;
yRotationCenter: YRotationCenter;
};