Skip to content

Commit a9a4b27

Browse files
Fix:
- Hand and finger select options is aligned with the main select element even on different screen size; - Hand and finger select chosen option can reduce and have extra '...' at the end if it's too long; - Heatmap legend, Finger context and Reset view button align perfectly on mobile; - Hand and finger select arrow is now 'locked' and cannot be dragged anymore; - the cursor will be pointing when it passes over hand or finger select.
1 parent 2490994 commit a9a4b27

3 files changed

Lines changed: 31 additions & 9 deletions

File tree

_includes/heatmap.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="select active" id="hand-select" role="select">
2525
<input class="select-checkbox" id="hand-select-checkbox" type="checkbox">
2626
<!-- the select content, the checkbox allow the switch for the display of the options -->
27-
<label for="hand-select-checkbox" style="display: flex; justify-content: space-between">
27+
<label for="hand-select-checkbox">
2828
<span id="hand-selected">{{ e.total }}</span>
2929
<img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;">
3030
</label>
@@ -40,7 +40,7 @@
4040
<div class="select" id="finger-select" role="select">
4141
<input class="select-checkbox" id="finger-select-checkbox" type="checkbox">
4242
<!-- the select content, the checkbox allow the switch for the display of the options -->
43-
<label for="finger-select-checkbox" style="display: flex; justify-content: space-between">
43+
<label for="finger-select-checkbox">
4444
<span id="finger-selected">{{ e.all_button }}</span>
4545
<img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;">
4646
</label>

assets/css/heatmap.css

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,40 @@
6464
}
6565

6666
.select {
67+
border: 1px solid #e8e8e8;
68+
border-radius: .5em;
69+
background-color: white;
6770
flex-direction: row;
71+
width: 15em;
72+
73+
position: relative;
6874

6975
opacity: 50%;
7076
pointer-events: none;
7177
}
7278

7379
label[for='hand-select-checkbox'], label[for='finger-select-checkbox'] {
74-
border: 1px solid #e8e8e8;
75-
border-radius: .5em;
7680
padding: .5em;
77-
background-color: white;
78-
width: 13em;
81+
cursor: pointer;
7982

8083
display: flex;
8184
align-items: center;
85+
justify-content: space-between;
86+
87+
width: 100%;
88+
box-sizing: border-box;
89+
90+
}
91+
92+
label span {
93+
overflow: hidden;
94+
white-space: nowrap;
95+
text-overflow: ellipsis;
96+
min-width: 0;
97+
}
98+
99+
label img {
100+
pointer-events: none;
82101
}
83102

84103
.select.active {
@@ -95,7 +114,10 @@ label[for='hand-select-checkbox'], label[for='finger-select-checkbox'] {
95114
transform: translateY(-.5em);
96115

97116
position: absolute;
98-
width: 13em;
117+
top: 100%;
118+
left: -1px;
119+
width: 101%;
120+
box-sizing: border-box;
99121
padding: .5em;
100122
border-left: 1px solid #e8e8e8;
101123
border-right: 1px solid #e8e8e8;
@@ -106,6 +128,7 @@ label[for='hand-select-checkbox'], label[for='finger-select-checkbox'] {
106128

107129
.select-option {
108130
margin-top: 0.4em;
131+
cursor: pointer;
109132
}
110133

111134
.select-checkbox ~ .select-options {
@@ -144,7 +167,6 @@ label[for='hand-select-checkbox'], label[for='finger-select-checkbox'] {
144167

145168
padding: 14px 20px;
146169
pointer-events: none;
147-
flex-wrap: wrap;
148170
}
149171

150172
.heatmap-legend {

assets/js/model-viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class Keycube {
7373

7474
// Autorotation settings (integrated with OrbitControls)
7575
this.controls.autoRotate = true;
76-
this.controls.autoRotateSpeed = 0.5; // Slower idle rotation
76+
this.controls.autoRotateSpeed = 0.5; // Slower speed rotation
7777
this.autoRotateStoppedByUser = false;
7878

7979
this.renderer.domElement.addEventListener('touchmove', this.captureViewerGesture, {passive: false});

0 commit comments

Comments
 (0)