Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -651,8 +651,8 @@ HTML_TEMPLATE = """
|
|
| 651 |
}
|
| 652 |
|
| 653 |
const centerIdx = kList.indexOf(closestK);
|
| 654 |
-
const start = Math.max(0, centerIdx -
|
| 655 |
-
const end = Math.min(kList.length, centerIdx +
|
| 656 |
const viewKs = kList.slice(start, end);
|
| 657 |
|
| 658 |
OPT_SYMS.forEach(o => {
|
|
@@ -663,7 +663,7 @@ HTML_TEMPLATE = """
|
|
| 663 |
// Fallback if no spot price yet (initial load)
|
| 664 |
const kList = Array.from(document.querySelectorAll('.row')).map(r => parseFloat(r.dataset.k));
|
| 665 |
const mid = Math.floor(kList.length/2);
|
| 666 |
-
const viewKs = kList.slice(Math.max(0, mid-
|
| 667 |
OPT_SYMS.forEach(o => { if(viewKs.includes(o.k)) symbolsToFetch.push(o.s); });
|
| 668 |
}
|
| 669 |
|
|
|
|
| 651 |
}
|
| 652 |
|
| 653 |
const centerIdx = kList.indexOf(closestK);
|
| 654 |
+
const start = Math.max(0, centerIdx - 18);
|
| 655 |
+
const end = Math.min(kList.length, centerIdx + 18);
|
| 656 |
const viewKs = kList.slice(start, end);
|
| 657 |
|
| 658 |
OPT_SYMS.forEach(o => {
|
|
|
|
| 663 |
// Fallback if no spot price yet (initial load)
|
| 664 |
const kList = Array.from(document.querySelectorAll('.row')).map(r => parseFloat(r.dataset.k));
|
| 665 |
const mid = Math.floor(kList.length/2);
|
| 666 |
+
const viewKs = kList.slice(Math.max(0, mid-18), mid+18);
|
| 667 |
OPT_SYMS.forEach(o => { if(viewKs.includes(o.k)) symbolsToFetch.push(o.s); });
|
| 668 |
}
|
| 669 |
|