MikaFil commited on
Commit
3026ba6
·
verified ·
1 Parent(s): 1240101

Update style/defaults/style.css

Browse files
Files changed (1) hide show
  1. style/defaults/style.css +251 -8
style/defaults/style.css CHANGED
@@ -1,3 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .tooltip-panel {
2
  position: absolute;
3
  top: 50%;
@@ -17,8 +225,8 @@
17
  flex-direction: column;
18
  align-items: flex-start;
19
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
 
20
  box-sizing: border-box;
21
- overflow: hidden; /* Only this panel never scrolls */
22
  }
23
 
24
  .tooltip-content {
@@ -26,10 +234,7 @@
26
  width: 100%;
27
  min-width: 160px;
28
  max-width: 100%;
29
- max-height: 68vh; /* Always fits in tooltip-panel (leave space for close btn and padding) */
30
- overflow-y: auto; /* Internal content scrolls */
31
  box-sizing: border-box;
32
- padding-right: 5px; /* Always room for scrollbar */
33
  }
34
 
35
  .tooltip-close {
@@ -61,11 +266,10 @@
61
 
62
  .tooltip-image {
63
  max-width: 100%;
64
- max-height: 35vh; /* Always smaller than tooltip-content */
65
  border-radius: 4px;
66
  margin-top: 5px;
67
  display: block;
68
- object-fit: contain;
69
  }
70
  @media (max-width: 600px) {
71
  .tooltip-panel {
@@ -83,9 +287,48 @@
83
  }
84
  .tooltip-content {
85
  min-width: 0;
86
- max-height: 41vh; /* Leaves room for panel border/padding/close btn */
87
  }
88
  .tooltip-image {
89
- max-height: 22vh;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
91
  }
 
1
+ /* viewer.css */
2
+
3
+ /* Widget container styling */
4
+ .ply-widget-container {
5
+ position: relative;
6
+ width: 100%;
7
+ height: 0;
8
+ background-color: white;
9
+ transition: all 0.3s ease;
10
+ box-sizing: border-box;
11
+ overflow: hidden;
12
+ }
13
+
14
+ /* Fake fullscreen (iOS fallback) */
15
+ .ply-widget-container.fake-fullscreen {
16
+ position: fixed !important;
17
+ top: 0 !important;
18
+ left: 0 !important;
19
+ width: 100vw !important;
20
+ height: 100vh !important;
21
+ padding-bottom: 0 !important;
22
+ z-index: 9999 !important;
23
+ background-color: black;
24
+ border-radius: 0 !important;
25
+ margin: 0 !important;
26
+ max-width: 100vw !important;
27
+ max-height: 100vh !important;
28
+ box-sizing: border-box;
29
+ overflow: hidden;
30
+ }
31
+
32
+ /* For native fullscreen - ensure no aspect ratio padding */
33
+ .ply-widget-container:fullscreen,
34
+ .ply-widget-container:-webkit-full-screen,
35
+ .ply-widget-container:-moz-full-screen,
36
+ .ply-widget-container:-ms-fullscreen {
37
+ width: 100vw !important;
38
+ height: 100vh !important;
39
+ padding-bottom: 0 !important;
40
+ border-radius: 0 !important;
41
+ background-color: black;
42
+ }
43
+
44
+ /* Viewer Container styling */
45
+ .viewer-container {
46
+ display: none;
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ right: 0;
51
+ bottom: 0;
52
+ width: 100%;
53
+ height: 100%;
54
+ background: black;
55
+ border: 1px solid #474558;
56
+ border-radius: 10px;
57
+ overflow: hidden;
58
+ box-sizing: border-box;
59
+ transition: all 0.3s ease;
60
+ min-height: 100%;
61
+ object-fit: contain;
62
+ }
63
+
64
+ /* When parent container is fullscreen, adjust viewer container */
65
+ .fake-fullscreen .viewer-container,
66
+ :fullscreen .viewer-container,
67
+ :-webkit-full-screen .viewer-container,
68
+ :-moz-full-screen .viewer-container,
69
+ :-ms-fullscreen .viewer-container {
70
+ border-radius: 0;
71
+ border: none;
72
+ width: 100%;
73
+ height: 100%;
74
+ }
75
+
76
+ /* Canvas fills the viewer container */
77
+ .ply-canvas {
78
+ width: 100%;
79
+ height: 100%;
80
+ display: block;
81
+ background-color: transparent;
82
+ z-index: 1;
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+ right: 0;
87
+ bottom: 0;
88
+ }
89
+
90
+ /* Make sure canvas fills entire space in fullscreen */
91
+ .fake-fullscreen .ply-canvas,
92
+ :fullscreen .ply-canvas,
93
+ :-webkit-full-screen .ply-canvas,
94
+ :-moz-full-screen .ply-canvas,
95
+ :-ms-fullscreen .ply-canvas {
96
+ width: 100vw;
97
+ height: 100vh;
98
+ }
99
+
100
+ /* Progress dialog styling (centered) */
101
+ .progress-dialog {
102
+ position: absolute;
103
+ top: 50%;
104
+ left: 50%;
105
+ transform: translate(-50%, -50%);
106
+ border: none;
107
+ background: rgba(0,0,0,0.7);
108
+ padding: 20px;
109
+ border-radius: 5px;
110
+ z-index: 1000;
111
+ display: none;
112
+ color: white;
113
+ }
114
+
115
+ /* Progress bar styling */
116
+ progress {
117
+ width: 250px;
118
+ height: 15px;
119
+ appearance: none;
120
+ border: none;
121
+ border-radius: 10px;
122
+ overflow: hidden;
123
+ }
124
+ progress::-webkit-progress-bar {
125
+ background-color: #333;
126
+ border-radius: 10px;
127
+ }
128
+ progress::-webkit-progress-value {
129
+ background-color: #4682B4;
130
+ border-radius: 10px;
131
+ }
132
+ progress::-moz-progress-bar {
133
+ background-color: #4682B4;
134
+ border-radius: 10px;
135
+ }
136
+
137
+ /* Menu (instructions) content styling */
138
+ .menu-content {
139
+ display: none;
140
+ position: absolute;
141
+ top: 50%;
142
+ left: 50%;
143
+ transform: translate(-50%, -50%);
144
+ background: rgba(242,240,239,0.9);
145
+ color: #545454;
146
+ border: 1px solid #ddd;
147
+ border-radius: 10px;
148
+ padding: 18px 24px;
149
+ font-size: 15px;
150
+ line-height: 1.4;
151
+ box-shadow: none;
152
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
153
+ z-index: 1010;
154
+ }
155
+
156
+ /* Help-close button inside instructions panel */
157
+ .help-close {
158
+ position: absolute;
159
+ top: 8px;
160
+ right: 8px;
161
+ background-color: #B0B0B0;
162
+ color: #333;
163
+ border: none;
164
+ border-radius: 4px;
165
+ width: 24px;
166
+ height: 24px;
167
+ line-height: 24px;
168
+ text-align: center;
169
+ cursor: pointer;
170
+ font-size: 16px;
171
+ }
172
+
173
+ /* Button styling with improved visibility and spacing tweaks */
174
+ .widget-button {
175
+ position: absolute;
176
+ width: 32px;
177
+ height: 32px;
178
+ background-color: #F2F0EF;
179
+ border: 1px solid #ccc;
180
+ border-radius: 8px;
181
+ cursor: pointer;
182
+ font-size: 16px;
183
+ color: #545454;
184
+ display: flex !important;
185
+ align-items: center;
186
+ justify-content: center;
187
+ transition: background-color 0.2s ease;
188
+ z-index: 1000;
189
+ opacity: 1 !important;
190
+ visibility: visible !important;
191
+ margin-right: 8px;
192
+ }
193
+ .widget-button:hover {
194
+ background-color: rgba(242,240,239,0.7);
195
+ }
196
+ .fullscreen-toggle { top: 12px; right: 12px; }
197
+ .help-toggle { top: 12px; right: 52px; font-size: 18px; }
198
+ .reset-camera-btn { top: 12px; right: 92px; font-size: 18px; line-height: normal; padding: 0; }
199
+ .tooltips-toggle { top: 12px; right: 132px; font-size: 18px; }
200
+ .fake-fullscreen .widget-button,
201
+ :fullscreen .widget-button,
202
+ :-webkit-full-screen .widget-button,
203
+ :-moz-full-screen .widget-button,
204
+ :-ms-fullscreen .widget-button {
205
+ z-index: 10000;
206
+ }
207
+
208
+ /* Tooltip panel: Always fits inside the viewer, scroll for overflow, close btn always visible */
209
  .tooltip-panel {
210
  position: absolute;
211
  top: 50%;
 
225
  flex-direction: column;
226
  align-items: flex-start;
227
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
228
+ overflow: auto;
229
  box-sizing: border-box;
 
230
  }
231
 
232
  .tooltip-content {
 
234
  width: 100%;
235
  min-width: 160px;
236
  max-width: 100%;
 
 
237
  box-sizing: border-box;
 
238
  }
239
 
240
  .tooltip-close {
 
266
 
267
  .tooltip-image {
268
  max-width: 100%;
269
+ max-height: 220px;
270
  border-radius: 4px;
271
  margin-top: 5px;
272
  display: block;
 
273
  }
274
  @media (max-width: 600px) {
275
  .tooltip-panel {
 
287
  }
288
  .tooltip-content {
289
  min-width: 0;
 
290
  }
291
  .tooltip-image {
292
+ max-height: 30vh;
293
+ }
294
+ }
295
+
296
+ /* --- Mobile adjustments: when the widget container has the "mobile" class --- */
297
+ .ply-widget-container.mobile .widget-button {
298
+ width: 24px;
299
+ height: 24px;
300
+ font-size: 12px;
301
+ }
302
+ .ply-widget-container.mobile .help-toggle { font-size: 14px; }
303
+ .ply-widget-container.mobile .fullscreen-toggle { top: 8px; right: 8px; }
304
+ .ply-widget-container.mobile .help-toggle { top: 8px; right: 40px; }
305
+ .ply-widget-container.mobile .reset-camera-btn { top: 8px; right: 72px; }
306
+ .ply-widget-container.mobile .tooltips-toggle { top: 8px; right: 104px; }
307
+
308
+ /* PlayCanvas compatibility */
309
+ #application-canvas {
310
+ width: 100%;
311
+ height: 100%;
312
+ display: block;
313
+ }
314
+ html, body {
315
+ margin: 0;
316
+ padding: 0;
317
+ height: 100%;
318
+ }
319
+ .progress-dialog p { margin: 0; padding: 5px; }
320
+
321
+ /* NEW MOBILE RULES — ensure instructions panel fits on phones */
322
+ @media (max-width: 600px) {
323
+ .menu-content {
324
+ width: 85vw;
325
+ max-height: 55vh;
326
+ overflow-y: auto;
327
+ padding: 40px 18px 14px;
328
+ font-size: 14px;
329
+ }
330
+ .menu-content .help-close {
331
+ top: 6px;
332
+ right: 6px;
333
  }
334
  }