lvwerra HF Staff commited on
Commit
e34c5a8
·
verified ·
1 Parent(s): fbc4cf6

Use click selection and anywhere deselection; restore sweep details and visible whole-tree reset

Browse files
README.md CHANGED
@@ -37,7 +37,7 @@ The original **Genome Atlas silhouettes**, without circle backgrounds, sit on th
37
 
38
  The Space uses a single wide title, a centred full-width tree and five resource buttons: **Model, Database, Explorer, Paper and Blog**. The sidebar, animation button and all cumulative sweep counters have been removed. Search, bar settings, comparison modes and zoom controls are available under **View options**. **About the data** retains the subset limitations and icon credits.
39
 
40
- Click the page background, then press **Space** to start or replay a four-second clockwise sweep; Space again or Escape stops it. A thin centre hand follows the selected strand, and its assembly info box updates during playback. The final assembly remains selected after the sweep. Playback has no aggregate counters. Only the interaction canvas redraws each frame; the detailed tree stays cached.
41
 
42
  For browser automation, `POC.startSweep()` and `POC.stopSweep(false)` provide the same controls. On the app URL, `?record=1` hides the small utility controls and suppresses mouse interactions for a clean recording while retaining the animated assembly info box; adding `&animate=1` starts one sweep a second after loading. Resource links and the title remain visible. These parameters apply to the app itself; the normal private Space page remains the entry point for signed-in users.
43
 
 
37
 
38
  The Space uses a single wide title, a centred full-width tree and five resource buttons: **Model, Database, Explorer, Paper and Blog**. The sidebar, animation button and all cumulative sweep counters have been removed. Search, bar settings, comparison modes and zoom controls are available under **View options**. **About the data** retains the subset limitations and icon credits.
39
 
40
+ Click the page background, then press **Space** to start or replay a four-second clockwise sweep; Space again or Escape stops it. A thin centre hand follows the selected strand, and its assembly info box updates during playback. The final assembly remains selected after the sweep. Clicking anywhere during playback stops it and clears the selection. Playback has no aggregate counters. Only the interaction canvas redraws each frame; the detailed tree stays cached.
41
 
42
  For browser automation, `POC.startSweep()` and `POC.stopSweep(false)` provide the same controls. On the app URL, `?record=1` hides the small utility controls and suppresses mouse interactions for a clean recording while retaining the animated assembly info box; adding `&animate=1` starts one sweep a second after loading. Resource links and the title remain visible. These parameters apply to the app itself; the normal private Space page remains the entry point for signed-in users.
43
 
app.js CHANGED
@@ -128,7 +128,7 @@ async function init(){try{const raw=Uint8Array.from(atob($('#dataset').textConte
128
  stage.addEventListener('pointerleave',()=>{hoverEvent=null;$('#layer-tooltip').hidden=true;if(hoverBin){hoverBin=null;schedule()}if(!down)canvas.style.cursor='default'});
129
  // Snapshot before target handlers run so actions inside the info box can use
130
  // the selected assembly before this same click clears it.
131
- document.addEventListener('click',e=>{e.hadAssemblySelection=!!pinnedAssembly},true);
132
  document.addEventListener('click',e=>{
133
  if(e.target.closest('#stage')){
134
  if(suppressChartClick){suppressChartClick=false;return}
@@ -136,7 +136,7 @@ async function init(){try{const raw=Uint8Array.from(atob($('#dataset').textConte
136
  if(e.hadAssemblySelection){clearSelection();return}
137
  const box=stage.getBoundingClientRect(),p=clickPoint||{x:e.clientX,y:e.clientY},x=p.x-box.left,y=p.y-box.top;clickPoint=null;
138
  const a=assemblyAtClick(x,y);if(a)selectAssembly(a);else clearSelection();
139
- }else if(e.hadAssemblySelection){clearSelection()}
140
  });
141
  document.addEventListener('keydown',e=>{if(e.key==='Escape'&&!document.querySelector('dialog[open]'))clearSelection()});
142
  $('#sel-download').onclick=()=>showDataAccess(selected);$('#data-close').onclick=()=>$('#data-dialog').close();$('#data-copy').onclick=copyDataCode;
 
128
  stage.addEventListener('pointerleave',()=>{hoverEvent=null;$('#layer-tooltip').hidden=true;if(hoverBin){hoverBin=null;schedule()}if(!down)canvas.style.cursor='default'});
129
  // Snapshot before target handlers run so actions inside the info box can use
130
  // the selected assembly before this same click clears it.
131
+ document.addEventListener('click',e=>{e.hadAssemblySelection=!!selected},true);
132
  document.addEventListener('click',e=>{
133
  if(e.target.closest('#stage')){
134
  if(suppressChartClick){suppressChartClick=false;return}
 
136
  if(e.hadAssemblySelection){clearSelection();return}
137
  const box=stage.getBoundingClientRect(),p=clickPoint||{x:e.clientX,y:e.clientY},x=p.x-box.left,y=p.y-box.top;clickPoint=null;
138
  const a=assemblyAtClick(x,y);if(a)selectAssembly(a);else clearSelection();
139
+ }else if(e.hadAssemblySelection){stopSweep(false);clearSelection()}
140
  });
141
  document.addEventListener('keydown',e=>{if(e.key==='Escape'&&!document.querySelector('dialog[open]'))clearSelection()});
142
  $('#sel-download').onclick=()=>showDataAccess(selected);$('#data-close').onclick=()=>$('#data-dialog').close();$('#data-copy').onclick=copyDataCode;
carbon-a-strand-source.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:09d40a78b0d612469caf0b4e285b020f225dd4639c76d8a613fdbb3156c30132
3
- size 15181594
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e7d8e675b00ff7937e694c20cda1bf88faf7445ad5f86a6b74a6dbcd027600
3
+ size 15181613
check_presentation.py CHANGED
@@ -111,7 +111,9 @@ def check(url=None,headers=None):
111
  page.evaluate("document.documentElement.dataset.recording='true';POC.startSweep()")
112
  page.wait_for_function('sweep.progress>.1 && sweep.running')
113
  assert page.locator('#selection').is_visible()
114
- page.evaluate('POC.stopSweep(false)')
 
 
115
  assert not errors,errors
116
  browser.close()
117
  return {'sweep_duration_ms':round(duration),'sweep_frames':len(frames),'background_redraws':result['redraws'],'layout':'desktop and mobile passed','click_selection_and_anywhere_deselection':'passed','clicks_do_not_zoom':'passed','visible_home_reset':'passed','sweep_info_matches_strand':'passed','search_and_downloads':'passed','resource_links':5,'counter_and_button':'removed','errors':errors}
 
111
  page.evaluate("document.documentElement.dataset.recording='true';POC.startSweep()")
112
  page.wait_for_function('sweep.progress>.1 && sweep.running')
113
  assert page.locator('#selection').is_visible()
114
+ page.locator('h1').click()
115
+ assert page.evaluate('selected===null && !sweep.running')
116
+ assert page.locator('#selection').is_hidden()
117
  assert not errors,errors
118
  browser.close()
119
  return {'sweep_duration_ms':round(duration),'sweep_frames':len(frames),'background_redraws':result['redraws'],'layout':'desktop and mobile passed','click_selection_and_anywhere_deselection':'passed','clicks_do_not_zoom':'passed','visible_home_reset':'passed','sweep_info_matches_strand':'passed','search_and_downloads':'passed','resource_links':5,'counter_and_button':'removed','errors':errors}
index.html CHANGED
@@ -410,7 +410,7 @@ async function init(){try{const raw=Uint8Array.from(atob($('#dataset').textConte
410
  stage.addEventListener('pointerleave',()=>{hoverEvent=null;$('#layer-tooltip').hidden=true;if(hoverBin){hoverBin=null;schedule()}if(!down)canvas.style.cursor='default'});
411
  // Snapshot before target handlers run so actions inside the info box can use
412
  // the selected assembly before this same click clears it.
413
- document.addEventListener('click',e=>{e.hadAssemblySelection=!!pinnedAssembly},true);
414
  document.addEventListener('click',e=>{
415
  if(e.target.closest('#stage')){
416
  if(suppressChartClick){suppressChartClick=false;return}
@@ -418,7 +418,7 @@ async function init(){try{const raw=Uint8Array.from(atob($('#dataset').textConte
418
  if(e.hadAssemblySelection){clearSelection();return}
419
  const box=stage.getBoundingClientRect(),p=clickPoint||{x:e.clientX,y:e.clientY},x=p.x-box.left,y=p.y-box.top;clickPoint=null;
420
  const a=assemblyAtClick(x,y);if(a)selectAssembly(a);else clearSelection();
421
- }else if(e.hadAssemblySelection){clearSelection()}
422
  });
423
  document.addEventListener('keydown',e=>{if(e.key==='Escape'&&!document.querySelector('dialog[open]'))clearSelection()});
424
  $('#sel-download').onclick=()=>showDataAccess(selected);$('#data-close').onclick=()=>$('#data-dialog').close();$('#data-copy').onclick=copyDataCode;
 
410
  stage.addEventListener('pointerleave',()=>{hoverEvent=null;$('#layer-tooltip').hidden=true;if(hoverBin){hoverBin=null;schedule()}if(!down)canvas.style.cursor='default'});
411
  // Snapshot before target handlers run so actions inside the info box can use
412
  // the selected assembly before this same click clears it.
413
+ document.addEventListener('click',e=>{e.hadAssemblySelection=!!selected},true);
414
  document.addEventListener('click',e=>{
415
  if(e.target.closest('#stage')){
416
  if(suppressChartClick){suppressChartClick=false;return}
 
418
  if(e.hadAssemblySelection){clearSelection();return}
419
  const box=stage.getBoundingClientRect(),p=clickPoint||{x:e.clientX,y:e.clientY},x=p.x-box.left,y=p.y-box.top;clickPoint=null;
420
  const a=assemblyAtClick(x,y);if(a)selectAssembly(a);else clearSelection();
421
+ }else if(e.hadAssemblySelection){stopSweep(false);clearSelection()}
422
  });
423
  document.addEventListener('keydown',e=>{if(e.key==='Escape'&&!document.querySelector('dialog[open]'))clearSelection()});
424
  $('#sel-download').onclick=()=>showDataAccess(selected);$('#data-close').onclick=()=>$('#data-dialog').close();$('#data-copy').onclick=copyDataCode;
presentation-mobile.png CHANGED

Git LFS Details

  • SHA256: ad76654c48834bd1f918e8f163bf4c7016b73b3e2007f3f120930c8fc0d17685
  • Pointer size: 131 Bytes
  • Size of remote file: 151 kB

Git LFS Details

  • SHA256: e1241d195ec5643dff504b750baa5db323d97844e0644c4cb71a930a7646197b
  • Pointer size: 131 Bytes
  • Size of remote file: 151 kB
presentation-verification.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
- "sweep_duration_ms": 4013,
3
- "sweep_frames": 125,
4
  "background_redraws": 0,
5
  "layout": "desktop and mobile passed",
6
  "click_selection_and_anywhere_deselection": "passed",
 
1
  {
2
+ "sweep_duration_ms": 4028,
3
+ "sweep_frames": 120,
4
  "background_redraws": 0,
5
  "layout": "desktop and mobile passed",
6
  "click_selection_and_anywhere_deselection": "passed",