-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathconstants.ts
49 lines (41 loc) · 1.29 KB
/
constants.ts
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { Maybe } from '@/src/types';
import vtkWidgetManager from '@kitware/vtk.js/Widgets/Core/WidgetManager';
import { ComputedRef, InjectionKey, Ref } from 'vue';
export const EPSILON = 10e-6;
export const NOOP = () => {};
// themes
export const ThemeStorageKey = 'app-theme';
export const DarkTheme = 'kw-dark';
export const LightTheme = 'kw-light';
export const DefaultTheme = DarkTheme;
/**
* Retrieves the parent VtkTwoView's widget manager.
*/
export const VTKTwoViewWidgetManager: InjectionKey<
ComputedRef<vtkWidgetManager>
> = Symbol('VTKTwoViewWidgetManager');
/**
* Retrieves the parent VtkThreeView's widget manager.
*/
export const VTKThreeViewWidgetManager: InjectionKey<
ComputedRef<vtkWidgetManager>
> = Symbol('VTKThreeViewWidgetManager');
/**
* Retrieves the parent tool HTML element.
*/
export const ToolContainer: InjectionKey<Ref<Maybe<HTMLElement>>> =
Symbol('ToolContainer');
export const DataTypes = {
Image: 'Image',
Labelmap: 'Labelmap',
Dicom: 'DICOM',
Model: 'Model',
};
export const Messages = {
WebGLLost: {
title: 'Viewer Error',
details:
'Lost the WebGL context! Please reload the webpage. If the problem persists, you may need to restart your web browser.',
},
} as const;
export const isDarwin = /Mac|iPhone|iPad/.test(navigator.platform);