MikaFil commited on
Commit
40b596d
·
verified ·
1 Parent(s): ad1df0e

Update style/defaults/style.css

Browse files
Files changed (1) hide show
  1. style/defaults/style.css +136 -227
style/defaults/style.css CHANGED
@@ -1,4 +1,4 @@
1
- /* style.css */
2
 
3
  /* Widget container styling */
4
  .ply-widget-container {
@@ -9,11 +9,7 @@
9
  transition: all 0.3s ease;
10
  box-sizing: border-box;
11
  overflow: hidden;
12
- pointer-events: auto !important;
13
- z-index: 10 !important;
14
  }
15
-
16
- /* When in fake fullscreen mode (iOS fallback) */
17
  .ply-widget-container.fake-fullscreen {
18
  position: fixed !important;
19
  top: 0 !important;
@@ -30,15 +26,7 @@
30
  box-sizing: border-box;
31
  overflow: hidden;
32
  }
33
-
34
- /* For native fullscreen - ensure no aspect ratio padding */
35
- .ply-widget-container:fullscreen {
36
- width: 100vw !important;
37
- height: 100vh !important;
38
- padding-bottom: 0 !important;
39
- border-radius: 0 !important;
40
- background-color: black;
41
- }
42
  .ply-widget-container:-webkit-full-screen,
43
  .ply-widget-container:-moz-full-screen,
44
  .ply-widget-container:-ms-fullscreen {
@@ -48,14 +36,11 @@
48
  border-radius: 0 !important;
49
  background-color: black;
50
  }
51
-
52
- /* Viewer Container styling */
53
  .viewer-container {
54
  display: none;
55
  position: absolute;
56
  top: 0; left: 0; right: 0; bottom: 0;
57
- width: 100%;
58
- height: 100%;
59
  background: black;
60
  border: 1px solid #474558;
61
  border-radius: 10px;
@@ -64,11 +49,7 @@
64
  transition: all 0.3s ease;
65
  min-height: 100%;
66
  object-fit: contain;
67
- pointer-events: auto !important;
68
- z-index: 100 !important;
69
  }
70
-
71
- /* When parent container is fullscreen, adjust viewer container */
72
  .fake-fullscreen .viewer-container,
73
  :fullscreen .viewer-container,
74
  :-webkit-full-screen .viewer-container,
@@ -79,8 +60,6 @@
79
  width: 100%;
80
  height: 100%;
81
  }
82
-
83
- /* Canvas fills the viewer container */
84
  .ply-canvas {
85
  width: 100%;
86
  height: 100%;
@@ -89,10 +68,15 @@
89
  z-index: 1;
90
  position: absolute;
91
  top: 0; left: 0; right: 0; bottom: 0;
92
- pointer-events: auto !important;
93
  }
94
-
95
- /* Progress dialog styling (centered) */
 
 
 
 
 
 
96
  .progress-dialog {
97
  position: absolute;
98
  top: 50%; left: 50%;
@@ -105,8 +89,6 @@
105
  display: none;
106
  color: white;
107
  }
108
-
109
- /* Progress bar styling */
110
  progress {
111
  width: 250px;
112
  height: 15px;
@@ -127,32 +109,24 @@ progress::-moz-progress-bar {
127
  background-color: #4682B4;
128
  border-radius: 10px;
129
  }
130
-
131
- /* -------------------- INSTRUCTIONS PANEL STYLING -------------------- */
132
  .menu-content {
133
  display: none;
134
  position: absolute;
135
  top: 50%; left: 50%;
136
  transform: translate(-50%, -50%);
137
- background: rgba(242,240,239,0.93);
138
  color: #545454;
139
  border: 1px solid #ddd;
140
  border-radius: 10px;
141
  padding: 18px 24px;
142
  font-size: 15px;
143
  line-height: 1.4;
 
144
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
145
  z-index: 1010;
146
- pointer-events: auto !important;
147
- box-sizing: border-box;
148
- /* --- ENSURE THE PANEL NEVER OVERFLOWS THE VIEWER --- */
149
- max-width: 70vw;
150
- max-height: 70vh;
151
- overflow: auto;
152
- min-width: 200px;
153
  }
154
-
155
- .menu-content .help-close {
156
  position: absolute;
157
  top: 8px;
158
  right: 8px;
@@ -166,45 +140,11 @@ progress::-moz-progress-bar {
166
  text-align: center;
167
  cursor: pointer;
168
  font-size: 16px;
169
- z-index: 1100;
170
- }
171
-
172
- /* Responsive rules for menu-content */
173
- @media (max-width: 900px) {
174
- .menu-content {
175
- max-width: 80vw !important;
176
- max-height: 80vh !important;
177
- font-size: 14px;
178
- padding: 16px 8px 14px 10px;
179
- overflow: auto !important;
180
- }
181
- }
182
- @media (max-width: 600px) {
183
- .menu-content {
184
- max-width: 80vw !important;
185
- max-height: 80vh !important;
186
- font-size: 13px;
187
- padding: 12px 4px 12px 6px;
188
- overflow: auto !important;
189
- }
190
- .menu-content .help-close {
191
- width: 28px;
192
- height: 28px;
193
- top: 4px;
194
- right: 4px;
195
- font-size: 16px;
196
- }
197
- }
198
-
199
- /* Menu-content never goes outside viewer */
200
- .viewer-container {
201
- overflow: visible !important;
202
- position: absolute;
203
  }
204
-
205
- /* -------------------- END INSTRUCTIONS PANEL -------------------- */
206
-
207
- /* Button styling with improved visibility and spacing tweaks */
208
  .widget-button {
209
  position: absolute;
210
  width: 32px;
@@ -219,106 +159,91 @@ progress::-moz-progress-bar {
219
  align-items: center;
220
  justify-content: center;
221
  transition: background-color 0.2s ease;
222
- z-index: 1000 !important;
223
  opacity: 1 !important;
224
  visibility: visible !important;
225
  margin-right: 8px;
226
- pointer-events: auto !important;
227
- }
228
- .widget-button:hover {
229
- background-color: rgba(242,240,239,0.7);
230
  }
231
-
232
- /* Specific button positions */
233
- .fullscreen-toggle {
234
- top: 12px;
235
- right: 12px;
236
- }
237
- .help-toggle {
238
- top: 12px;
239
- right: 52px;
240
- font-size: 18px;
241
- }
242
- .reset-camera-btn {
243
- top: 12px;
244
- right: 92px;
245
- font-size: 18px;
246
- line-height: normal;
247
- padding: 0;
248
- }
249
- .tooltips-toggle {
250
- top: 12px;
251
- right: 132px;
252
- font-size: 18px;
253
- }
254
-
255
- /* Ensure buttons remain visible in fullscreen */
256
  .fake-fullscreen .widget-button,
257
  :fullscreen .widget-button,
258
  :-webkit-full-screen .widget-button,
259
  :-moz-full-screen .widget-button,
260
- :-ms-fullscreen .widget-button {
261
- z-index: 10000;
262
- }
 
263
 
264
- /* Tooltip panel styling */
265
  .tooltip-panel {
266
  position: absolute;
267
  top: 50%;
268
  right: 5%;
269
- transform: translate(0%, -50%);
270
  background: rgba(242,240,239,0.97);
271
  color: #545454;
272
  border: 1px solid #ddd;
273
- border-radius: 8px;
274
- padding: 15px 12px 15px 15px;
275
- max-width: 90vw;
276
- max-height: 70vh;
277
- z-index: 20000 !important;
 
 
 
278
  display: none;
279
  flex-direction: column;
280
  align-items: flex-start;
281
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
282
- pointer-events: auto !important;
283
- overflow: auto !important;
284
  box-sizing: border-box;
 
285
  }
286
 
287
- /* Content wrapper for tooltip, leave room at top for close button */
288
  .tooltip-content {
289
- position: relative;
290
  width: 100%;
 
 
291
  box-sizing: border-box;
292
- padding-top: 6px;
293
- overflow: auto;
294
- max-height: 65vh;
 
 
295
  }
296
 
297
- /* Tooltip close button styled like the main buttons, always in corner */
298
  .tooltip-close {
299
  position: absolute;
300
- top: 10px;
301
- right: 10px;
302
  width: 32px;
303
  height: 32px;
304
  background: #F2F0EF;
305
- color: #545454;
306
  border: 1px solid #ccc;
307
  border-radius: 8px;
 
 
308
  display: flex;
309
  align-items: center;
310
  justify-content: center;
311
- font-size: 18px;
312
  cursor: pointer;
313
- z-index: 10001;
 
314
  box-sizing: border-box;
315
- pointer-events: auto;
316
- font-weight: bold;
317
  padding: 0;
318
- transition: background 0.2s;
319
  }
320
- .tooltip-close:hover {
321
- background: #ececec;
 
 
322
  }
323
 
324
  /* Tooltip text and image */
@@ -326,72 +251,98 @@ progress::-moz-progress-bar {
326
  margin-bottom: 10px;
327
  font-size: 14px;
328
  line-height: 1.4;
 
329
  word-break: break-word;
 
330
  }
331
  .tooltip-image {
332
  max-width: 100%;
333
- height: auto;
334
  border-radius: 4px;
335
  margin-top: 5px;
336
  display: block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  }
338
 
339
- /* Mobile adjustments */
340
  .ply-widget-container.mobile .widget-button {
341
  width: 24px;
342
  height: 24px;
343
  font-size: 12px;
344
  }
345
- .ply-widget-container.mobile .help-toggle {
346
- font-size: 14px;
347
- }
348
- .ply-widget-container.mobile .fullscreen-toggle {
349
- top: 8px;
350
- right: 8px;
351
- }
352
- .ply-widget-container.mobile .help-toggle {
353
- top: 8px;
354
- right: 40px;
355
- }
356
- .ply-widget-container.mobile .reset-camera-btn {
357
- top: 8px;
358
- right: 72px;
359
- }
360
- .ply-widget-container.mobile .tooltips-toggle {
361
- top: 8px;
362
- right: 104px;
363
- }
364
- .ply-widget-container.mobile .tooltip-panel {
365
- max-width: 98vw;
366
- max-height: 54vh;
367
- padding: 8px 5px 12px 8px;
368
- }
369
 
370
- /* PlayCanvas compatibility */
371
- #application-canvas {
372
- width: 100%;
373
- height: 100%;
374
- display: block;
375
- }
376
- html, body {
377
- margin: 0;
378
- padding: 0;
379
- height: 100%;
380
- }
381
 
382
- /* Error message styling */
383
- .progress-dialog p {
384
- margin: 0;
385
- padding: 5px;
386
- }
387
-
388
- /* Instructions panel fit on phones */
389
  @media (max-width: 600px) {
390
  .menu-content {
391
- width: auto;
392
- max-width: 90vw !important;
393
- max-height: 65vh !important;
394
- overflow: auto !important;
395
  padding: 40px 18px 14px;
396
  font-size: 14px;
397
  }
@@ -399,46 +350,4 @@ html, body {
399
  top: 6px;
400
  right: 6px;
401
  }
402
- .tooltip-panel {
403
- max-width: 98vw;
404
- max-height: 54vh;
405
- padding: 8px 5px 12px 8px;
406
- }
407
- .tooltip-close {
408
- width: 28px;
409
- height: 28px;
410
- top: 4px;
411
- right: 4px;
412
- font-size: 16px;
413
- }
414
- }
415
-
416
- /* Misc pointer events enforcement for all key UI overlays */
417
- .ply-widget-container,
418
- .viewer-container,
419
- .ply-canvas,
420
- .tooltip-panel,
421
- .widget-button,
422
- .menu-content {
423
- pointer-events: auto !important;
424
- z-index: 9999 !important;
425
- }
426
-
427
- .ply-widget-container,
428
- .ply-widget-container * {
429
- pointer-events: auto !important;
430
- z-index: 2147483647 !important;
431
- }
432
-
433
- .sqs-block-content * {
434
- pointer-events: auto !important;
435
- }
436
- .ply-widget-container,
437
- .viewer-container,
438
- .ply-canvas,
439
- #application-canvas,
440
- canvas {
441
- pointer-events: auto !important;
442
- touch-action: auto !important;
443
- z-index: 100 !important;
444
  }
 
1
+ /* viewer.css */
2
 
3
  /* Widget container styling */
4
  .ply-widget-container {
 
9
  transition: all 0.3s ease;
10
  box-sizing: border-box;
11
  overflow: hidden;
 
 
12
  }
 
 
13
  .ply-widget-container.fake-fullscreen {
14
  position: fixed !important;
15
  top: 0 !important;
 
26
  box-sizing: border-box;
27
  overflow: hidden;
28
  }
29
+ .ply-widget-container:fullscreen,
 
 
 
 
 
 
 
 
30
  .ply-widget-container:-webkit-full-screen,
31
  .ply-widget-container:-moz-full-screen,
32
  .ply-widget-container:-ms-fullscreen {
 
36
  border-radius: 0 !important;
37
  background-color: black;
38
  }
 
 
39
  .viewer-container {
40
  display: none;
41
  position: absolute;
42
  top: 0; left: 0; right: 0; bottom: 0;
43
+ width: 100%; height: 100%;
 
44
  background: black;
45
  border: 1px solid #474558;
46
  border-radius: 10px;
 
49
  transition: all 0.3s ease;
50
  min-height: 100%;
51
  object-fit: contain;
 
 
52
  }
 
 
53
  .fake-fullscreen .viewer-container,
54
  :fullscreen .viewer-container,
55
  :-webkit-full-screen .viewer-container,
 
60
  width: 100%;
61
  height: 100%;
62
  }
 
 
63
  .ply-canvas {
64
  width: 100%;
65
  height: 100%;
 
68
  z-index: 1;
69
  position: absolute;
70
  top: 0; left: 0; right: 0; bottom: 0;
 
71
  }
72
+ .fake-fullscreen .ply-canvas,
73
+ :fullscreen .ply-canvas,
74
+ :-webkit-full-screen .ply-canvas,
75
+ :-moz-full-screen .ply-canvas,
76
+ :-ms-fullscreen .ply-canvas {
77
+ width: 100vw;
78
+ height: 100vh;
79
+ }
80
  .progress-dialog {
81
  position: absolute;
82
  top: 50%; left: 50%;
 
89
  display: none;
90
  color: white;
91
  }
 
 
92
  progress {
93
  width: 250px;
94
  height: 15px;
 
109
  background-color: #4682B4;
110
  border-radius: 10px;
111
  }
112
+ /* Menu (instructions) content styling */
 
113
  .menu-content {
114
  display: none;
115
  position: absolute;
116
  top: 50%; left: 50%;
117
  transform: translate(-50%, -50%);
118
+ background: rgba(242,240,239,0.9);
119
  color: #545454;
120
  border: 1px solid #ddd;
121
  border-radius: 10px;
122
  padding: 18px 24px;
123
  font-size: 15px;
124
  line-height: 1.4;
125
+ box-shadow: none;
126
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
127
  z-index: 1010;
 
 
 
 
 
 
 
128
  }
129
+ .help-close {
 
130
  position: absolute;
131
  top: 8px;
132
  right: 8px;
 
140
  text-align: center;
141
  cursor: pointer;
142
  font-size: 16px;
143
+ display: flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ padding: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  }
 
 
 
 
148
  .widget-button {
149
  position: absolute;
150
  width: 32px;
 
159
  align-items: center;
160
  justify-content: center;
161
  transition: background-color 0.2s ease;
162
+ z-index: 1000;
163
  opacity: 1 !important;
164
  visibility: visible !important;
165
  margin-right: 8px;
 
 
 
 
166
  }
167
+ .widget-button:hover { background-color: rgba(242,240,239,0.7); }
168
+ .fullscreen-toggle { top: 12px; right: 12px; }
169
+ .help-toggle { top: 12px; right: 52px; font-size: 18px; }
170
+ .reset-camera-btn { top: 12px; right: 92px; font-size: 18px; line-height: normal; padding: 0; }
171
+ .tooltips-toggle { top: 12px; right: 132px; font-size: 18px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  .fake-fullscreen .widget-button,
173
  :fullscreen .widget-button,
174
  :-webkit-full-screen .widget-button,
175
  :-moz-full-screen .widget-button,
176
+ :-ms-fullscreen .widget-button { z-index: 10000; }
177
+
178
+ /* --------- TOOLTIP PANEL ----------- */
179
+ /* ...rest of your CSS remains unchanged... */
180
 
181
+ /* --------- TOOLTIP PANEL ----------- */
182
  .tooltip-panel {
183
  position: absolute;
184
  top: 50%;
185
  right: 5%;
186
+ transform: translate(0, -50%);
187
  background: rgba(242,240,239,0.97);
188
  color: #545454;
189
  border: 1px solid #ddd;
190
+ border-radius: 6px;
191
+ padding: 20px 20px 16px 16px; /* Extra top/right for button */
192
+ max-width: 340px;
193
+ width: 92vw;
194
+ min-width: 180px;
195
+ min-height: 60px;
196
+ max-height: 90vh;
197
+ z-index: 20000;
198
  display: none;
199
  flex-direction: column;
200
  align-items: flex-start;
201
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
202
+ overflow: auto;
 
203
  box-sizing: border-box;
204
+ position: absolute;
205
  }
206
 
207
+ /* Ensure content does not go under close button */
208
  .tooltip-content {
 
209
  width: 100%;
210
+ min-width: 160px;
211
+ max-width: 100%;
212
  box-sizing: border-box;
213
+ display: flex;
214
+ flex-direction: column;
215
+ align-items: flex-start;
216
+ overflow: hidden;
217
+ margin-top: 0;
218
  }
219
 
220
+ /* CLOSE BUTTON AS SQUARE WITH ROUNDED CORNERS */
221
  .tooltip-close {
222
  position: absolute;
223
+ top: 12px;
224
+ right: 12px;
225
  width: 32px;
226
  height: 32px;
227
  background: #F2F0EF;
228
+ color: #333;
229
  border: 1px solid #ccc;
230
  border-radius: 8px;
231
+ font-size: 17px;
232
+ font-weight: bold;
233
  display: flex;
234
  align-items: center;
235
  justify-content: center;
236
+ line-height: 1;
237
  cursor: pointer;
238
+ z-index: 2;
239
+ transition: background 0.18s;
240
  box-sizing: border-box;
 
 
241
  padding: 0;
 
242
  }
243
+ .tooltip-close:hover,
244
+ .tooltip-close:focus {
245
+ background: #e0e0e0;
246
+ outline: none;
247
  }
248
 
249
  /* Tooltip text and image */
 
251
  margin-bottom: 10px;
252
  font-size: 14px;
253
  line-height: 1.4;
254
+ overflow-wrap: break-word;
255
  word-break: break-word;
256
+ max-width: 100%;
257
  }
258
  .tooltip-image {
259
  max-width: 100%;
260
+ max-height: 35vh;
261
  border-radius: 4px;
262
  margin-top: 5px;
263
  display: block;
264
+ object-fit: contain;
265
+ box-sizing: border-box;
266
+ }
267
+
268
+ /* --- MOBILE adjustments --- */
269
+ @media (max-width: 600px) {
270
+ .tooltip-panel {
271
+ top: auto;
272
+ bottom: 8px;
273
+ right: 3vw;
274
+ left: 3vw;
275
+ transform: none;
276
+ width: auto;
277
+ max-width: 94vw;
278
+ min-width: 0;
279
+ max-height: 55vh;
280
+ padding: 16px 10px 12px 10px;
281
+ font-size: 13.5px;
282
+ }
283
+ .tooltip-close {
284
+ top: 8px;
285
+ right: 8px;
286
+ width: 26px;
287
+ height: 26px;
288
+ font-size: 15px;
289
+ }
290
+ .tooltip-image {
291
+ max-height: 22vh;
292
+ }
293
+ }
294
+
295
+
296
+ /* --- Mobile adjustments --- */
297
+ @media (max-width: 600px) {
298
+ .tooltip-panel {
299
+ top: auto;
300
+ bottom: 8px;
301
+ right: 3vw;
302
+ left: 3vw;
303
+ transform: none;
304
+ width: auto;
305
+ max-width: 94vw;
306
+ min-width: 0;
307
+ max-height: 55vh;
308
+ padding: 28px 14px 12px 12px; /* extra for top, right */
309
+ font-size: 13.5px;
310
+ }
311
+ .tooltip-content {
312
+ min-width: 0;
313
+ }
314
+ .tooltip-close {
315
+ top: 6px;
316
+ right: 6px;
317
+ width: 26px;
318
+ height: 26px;
319
+ font-size: 15px;
320
+ }
321
+ .tooltip-image {
322
+ max-height: 22vh;
323
+ }
324
  }
325
 
 
326
  .ply-widget-container.mobile .widget-button {
327
  width: 24px;
328
  height: 24px;
329
  font-size: 12px;
330
  }
331
+ .ply-widget-container.mobile .help-toggle { font-size: 14px; }
332
+ .ply-widget-container.mobile .fullscreen-toggle { top: 8px; right: 8px; }
333
+ .ply-widget-container.mobile .help-toggle { top: 8px; right: 40px; }
334
+ .ply-widget-container.mobile .reset-camera-btn { top: 8px; right: 72px; }
335
+ .ply-widget-container.mobile .tooltips-toggle { top: 8px; right: 104px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
 
337
+ #application-canvas { width: 100%; height: 100%; display: block; }
338
+ html, body { margin: 0; padding: 0; height: 100%; }
339
+ .progress-dialog p { margin: 0; padding: 5px; }
 
 
 
 
 
 
 
 
340
 
 
 
 
 
 
 
 
341
  @media (max-width: 600px) {
342
  .menu-content {
343
+ width: 85vw;
344
+ max-height: 55vh;
345
+ overflow-y: auto;
 
346
  padding: 40px 18px 14px;
347
  font-size: 14px;
348
  }
 
350
  top: 6px;
351
  right: 6px;
352
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
353
  }