topsecrettraders commited on
Commit
f03c1fb
·
verified ·
1 Parent(s): fbe5845

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -651,8 +651,8 @@ HTML_TEMPLATE = """
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,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-18), mid+18);
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 - 30);
655
+ const end = Math.min(kList.length, centerIdx + 30);
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-30), mid+30);
667
  OPT_SYMS.forEach(o => { if(viewKs.includes(o.k)) symbolsToFetch.push(o.s); });
668
  }
669