-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactions.ts
More file actions
26 lines (22 loc) · 920 Bytes
/
actions.ts
File metadata and controls
26 lines (22 loc) · 920 Bytes
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
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;
}