Spaces:
Sleeping
Sleeping
Update static/index.html
Browse files- static/index.html +52 -11
static/index.html
CHANGED
|
@@ -73,11 +73,36 @@
|
|
| 73 |
#panel.min ~ #stage #saveState, #panel.min ~ #saveState { left:28px; }
|
| 74 |
|
| 75 |
/* Pins (bigger + more transparent) */
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
.pin:hover{background:rgba(255,255,255,.26)}
|
| 82 |
|
| 83 |
/* Popups: centered exactly on the pin midpoint */
|
|
@@ -349,12 +374,28 @@
|
|
| 349 |
$('#count').textContent = String(state.items.length);
|
| 350 |
overlay.innerHTML = '';
|
| 351 |
for (const it of state.items){
|
| 352 |
-
const pin = document.createElement('
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
|
| 359 |
if (it.open){
|
| 360 |
const pop = document.createElement('div'); pop.className='popup';
|
|
|
|
| 73 |
#panel.min ~ #stage #saveState, #panel.min ~ #saveState { left:28px; }
|
| 74 |
|
| 75 |
/* Pins (bigger + more transparent) */
|
| 76 |
+
/* Bigger, lighter pin with a guaranteed full hit area */
|
| 77 |
+
.pin{
|
| 78 |
+
position:absolute;
|
| 79 |
+
left:0; top:0;
|
| 80 |
+
width:34px; height:34px; /* bigger */
|
| 81 |
+
border-radius:50%;
|
| 82 |
+
border:2px solid rgba(255,255,255,.45);
|
| 83 |
+
background:rgba(255,255,255,.12); /* more transparent */
|
| 84 |
+
box-shadow:0 2px 10px rgba(0,0,0,.45);
|
| 85 |
+
transform:translate(-50%, -50%);
|
| 86 |
+
z-index:3;
|
| 87 |
+
cursor:pointer;
|
| 88 |
+
|
| 89 |
+
/* kill any UA quirks if it’s a <button> */
|
| 90 |
+
display:block;
|
| 91 |
+
padding:0;
|
| 92 |
+
line-height:0;
|
| 93 |
+
-webkit-appearance:none;
|
| 94 |
+
appearance:none;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
/* Expand the clickable area beyond the visual circle (keeps look the same) */
|
| 98 |
+
.pin::before{
|
| 99 |
+
content:"";
|
| 100 |
+
position:absolute;
|
| 101 |
+
inset:-10px; /* +10px all around = easier tapping */
|
| 102 |
+
border-radius:50%;
|
| 103 |
+
/* no background needed; clicks will still land on .pin */
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
.pin:hover{background:rgba(255,255,255,.26)}
|
| 107 |
|
| 108 |
/* Popups: centered exactly on the pin midpoint */
|
|
|
|
| 374 |
$('#count').textContent = String(state.items.length);
|
| 375 |
overlay.innerHTML = '';
|
| 376 |
for (const it of state.items){
|
| 377 |
+
const pin = document.createElement('div');
|
| 378 |
+
pin.className = 'pin';
|
| 379 |
+
pin.setAttribute('role', 'button');
|
| 380 |
+
pin.setAttribute('tabindex', '0');
|
| 381 |
+
|
| 382 |
+
pin.style.left = it.x + '%';
|
| 383 |
+
pin.style.top = it.y + '%';
|
| 384 |
+
pin.title = it.title || it.type;
|
| 385 |
+
|
| 386 |
+
pin.addEventListener('click', (e) => {
|
| 387 |
+
e.stopPropagation();
|
| 388 |
+
togglePopup(it.id);
|
| 389 |
+
});
|
| 390 |
+
pin.addEventListener('keydown', (e) => {
|
| 391 |
+
if (e.key === 'Enter' || e.key === ' ') {
|
| 392 |
+
e.preventDefault();
|
| 393 |
+
togglePopup(it.id);
|
| 394 |
+
}
|
| 395 |
+
});
|
| 396 |
+
|
| 397 |
+
overlay.appendChild(pin);
|
| 398 |
+
|
| 399 |
|
| 400 |
if (it.open){
|
| 401 |
const pop = document.createElement('div'); pop.className='popup';
|