Skip to content

Commit 6adda0c

Browse files
Updates to image annotations (#60)
* Make image reference lowercase to match files * Add temp js for annotation * Make add another work better * Put radios in grid system
1 parent 04fb165 commit 6adda0c

File tree

4 files changed

+351
-122
lines changed

4 files changed

+351
-122
lines changed

app/assets/sass/_misc.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
justify-content: space-between;
1717
margin-bottom: 20px;
1818

19-
img {
19+
app-mammogram-container {
2020
width: 48%;
2121
}
2222
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/* Mammogram annotation styles */
2+
3+
.app-mammogram-image {
4+
cursor: crosshair;
5+
max-width: 100%;
6+
display: block;
7+
}
8+
9+
.app-mammogram-container {
10+
position: relative;
11+
display: inline-block;
12+
margin-bottom: 1rem;
13+
}
14+
15+
.app-mammogram-marker {
16+
position: absolute;
17+
width: 30px;
18+
height: 30px;
19+
border-radius: 50%;
20+
border: 3px solid #d5281b;
21+
background-color: rgba(213, 40, 27, 0.4);
22+
transform: translate(-50%, -50%);
23+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
24+
z-index: 10;
25+
cursor: grab;
26+
transition: background-color 0.2s ease;
27+
}
28+
29+
/* Horizontal line of the crosshair */
30+
.app-mammogram-marker::before {
31+
content: '';
32+
position: absolute;
33+
left: 0;
34+
top: 50%;
35+
width: 100%;
36+
height: 2px;
37+
background-color: #d5281b;
38+
transform: translateY(-50%);
39+
}
40+
41+
/* Vertical line of the crosshair */
42+
.app-mammogram-marker::after {
43+
content: '';
44+
position: absolute;
45+
left: 50%;
46+
top: 0;
47+
width: 2px;
48+
height: 100%;
49+
background-color: #d5281b;
50+
transform: translateX(-50%);
51+
}
52+
53+
/* Visual feedback when dragging */
54+
.app-mammogram-marker.dragging {
55+
background-color: rgba(213, 40, 27, 0.6);
56+
cursor: grabbing;
57+
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 12px rgba(0, 0, 0, 0.7);
58+
transform: translate(-50%, -50%) scale(1.1);
59+
}
60+
61+
/* Animation to make marker more noticeable when placed */
62+
@keyframes pulse {
63+
0% { transform: translate(-50%, -50%) scale(1); }
64+
50% { transform: translate(-50%, -50%) scale(1.2); }
65+
100% { transform: translate(-50%, -50%) scale(1); }
66+
}
67+
68+
.app-mammogram-marker {
69+
animation: pulse 0.6s ease-in-out;
70+
}

app/assets/sass/main.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
@import 'components/overrides';
1818

19+
@import 'components/annotation';
20+
1921

2022

2123
@import 'misc';

0 commit comments

Comments
 (0)