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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/// The HTML `id` attribute value for the drawing canvas element.
pub const CANVAS_DRAWING_ID: &str = "drawing-canvas";
/// The CSS selector used to query the drawing canvas element from the DOM.
pub const CANVAS_DRAWING_SELECTOR: &str = "#drawing-canvas";
/// The HTML `id` attribute value for the canvas container wrapper element.
pub const CANVAS_CONTAINER_ID: &str = "canvas-container";
/// The HTML `id` attribute value for the fullscreen canvas drawing wrapper.
pub const CANVAS_FULLSCREEN_WRAPPER_ID: &str = "fullscreen-canvas-wrapper";
/// The CSS selector used to query the fullscreen canvas drawing wrapper.
pub const CANVAS_FULLSCREEN_WRAPPER_SELECTOR: &str = "#fullscreen-canvas-wrapper";
/// The default stroke color for drawing.
pub const CANVAS_DEFAULT_STROKE_COLOR: &str = "#000000";
/// The default line width for drawing in pixels.
pub const CANVAS_DEFAULT_LINE_WIDTH: f64 = 3.0;
/// The canvas background fill color.
pub const CANVAS_BACKGROUND_COLOR: &str = "#ffffff";
/// The minimum allowed line width for drawing.
pub const CANVAS_MIN_LINE_WIDTH: f64 = 1.0;
/// The HTML attribute value for the range input minimum.
pub const CANVAS_MIN_LINE_WIDTH_ATTR: &str = "1";
/// The HTML attribute value for the range input maximum.
pub const CANVAS_MAX_LINE_WIDTH_ATTR: &str = "30";
/// The HTML attribute value for the range input step.
pub const CANVAS_LINE_WIDTH_STEP_ATTR: &str = "1";
/// The label displayed on the draw button.
pub const CANVAS_DRAW_LABEL: &str = "Draw";
/// The label displayed on the fullscreen exit button.
pub const CANVAS_FULLSCREEN_EXIT_LABEL: &str = "Exit";
/// The localStorage key for persisting the stroke color.
pub const CANVAS_STORAGE_KEY_STROKE_COLOR: &str = "euv-canvas-stroke-color";
/// The localStorage key for persisting the line width.
pub const CANVAS_STORAGE_KEY_LINE_WIDTH: &str = "euv-canvas-line-width";
/// The canvas 2D rendering context type identifier.
pub const CANVAS_CONTEXT_TYPE: &str = "2d";
/// The JavaScript property name for the device pixel ratio.
pub const CANVAS_EVENT_PROPERTY_DEVICE_PIXEL_RATIO: &str = "devicePixelRatio";
/// The JavaScript property name for the canvas stroke style.
pub const CANVAS_CONTEXT_PROPERTY_STROKE_STYLE: &str = "strokeStyle";
/// The JavaScript property name for the canvas fill style.
pub const CANVAS_CONTEXT_PROPERTY_FILL_STYLE: &str = "fillStyle";
/// The line cap style for smooth stroke endings.
pub const CANVAS_LINE_CAP_ROUND: &str = "round";
/// The line join style for smooth stroke corners.
pub const CANVAS_LINE_JOIN_ROUND: &str = "round";
/// The JavaScript property name for the event target element.
pub const CANVAS_EVENT_PROPERTY_TARGET: &str = "target";
/// The JavaScript property name for the input element value.
pub const CANVAS_EVENT_PROPERTY_VALUE: &str = "value";
/// The JavaScript property name for the pointer offset X coordinate.
pub const CANVAS_EVENT_PROPERTY_OFFSET_X: &str = "offsetX";
/// The JavaScript property name for the pointer offset Y coordinate.
pub const CANVAS_EVENT_PROPERTY_OFFSET_Y: &str = "offsetY";
/// The JavaScript property name for the client X coordinate.
pub const CANVAS_EVENT_PROPERTY_CLIENT_X: &str = "clientX";
/// The JavaScript property name for the client Y coordinate.
pub const CANVAS_EVENT_PROPERTY_CLIENT_Y: &str = "clientY";
/// The CSS style property name for width.
pub const CANVAS_STYLE_PROPERTY_WIDTH: &str = "width";
/// The CSS style property name for height.
pub const CANVAS_STYLE_PROPERTY_HEIGHT: &str = "height";
/// The pixel unit suffix for CSS property values.
pub const CANVAS_PIXEL_UNIT: &str = "px";