MikaFil commited on
Commit
1de575b
·
verified ·
1 Parent(s): 85d0d45

Update style/defaults/style.css

Browse files
Files changed (1) hide show
  1. style/defaults/style.css +274 -27
style/defaults/style.css CHANGED
@@ -1,4 +1,211 @@
1
- /* Tooltip panel styling: always fits inside viewer */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .tooltip-panel {
3
  position: absolute;
4
  top: 50%;
@@ -9,8 +216,8 @@
9
  border: 1px solid #ddd;
10
  border-radius: 6px;
11
  padding: 15px;
12
- max-width: 92vw; /* Never exceed viewport width */
13
- max-height: 90vh; /* Never exceed 90% of viewer */
14
  min-width: 180px;
15
  min-height: 60px;
16
  z-index: 20000;
@@ -18,7 +225,7 @@
18
  flex-direction: column;
19
  align-items: flex-start;
20
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
21
- overflow: auto; /* Scroll for overflow! */
22
  box-sizing: border-box;
23
  }
24
 
@@ -30,27 +237,6 @@
30
  box-sizing: border-box;
31
  }
32
 
33
- /* Mobile fix: make sure tooltip fits vertically and horizontally */
34
- @media (max-width: 600px) {
35
- .tooltip-panel {
36
- top: auto;
37
- bottom: 8px;
38
- right: 3vw;
39
- left: 3vw;
40
- transform: none;
41
- width: auto;
42
- max-width: 94vw;
43
- min-width: 0;
44
- max-height: 60vh;
45
- padding: 12px;
46
- font-size: 13.5px;
47
- }
48
- .tooltip-content {
49
- min-width: 0;
50
- }
51
- }
52
-
53
- /* Always keep the close button visible */
54
  .tooltip-close {
55
  position: absolute;
56
  top: -8px;
@@ -72,16 +258,77 @@
72
  z-index: 2;
73
  }
74
 
75
- /* Tooltip image: never overflow panel */
 
 
 
 
 
76
  .tooltip-image {
77
  max-width: 100%;
78
- max-height: 220px; /* limits tall images on mobile */
79
  border-radius: 4px;
80
  margin-top: 5px;
81
  display: block;
82
  }
83
  @media (max-width: 600px) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  .tooltip-image {
85
  max-height: 30vh;
86
  }
87
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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%;
 
216
  border: 1px solid #ddd;
217
  border-radius: 6px;
218
  padding: 15px;
219
+ max-width: 92vw;
220
+ max-height: 90vh;
221
  min-width: 180px;
222
  min-height: 60px;
223
  z-index: 20000;
 
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
 
 
237
  box-sizing: border-box;
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  .tooltip-close {
241
  position: absolute;
242
  top: -8px;
 
258
  z-index: 2;
259
  }
260
 
261
+ .tooltip-text {
262
+ margin-bottom: 10px;
263
+ font-size: 14px;
264
+ line-height: 1.4;
265
+ }
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 {
276
+ top: auto;
277
+ bottom: 8px;
278
+ right: 3vw;
279
+ left: 3vw;
280
+ transform: none;
281
+ width: auto;
282
+ max-width: 94vw;
283
+ min-width: 0;
284
+ max-height: 60vh;
285
+ padding: 12px;
286
+ font-size: 13.5px;
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
+ }