fix: refine presentation slides 2, 5 and 7
Build and publish Eldorado documentation / build (pull_request) Successful in 56s
Build and publish Eldorado documentation / build (pull_request) Successful in 56s
This commit is contained in:
1 parent
46bb8b2b48
commit
499049eff3
6 files changed
+57
-10
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Browser-side geometry contract, shared by standalone and embedded acceptance.
|
||||
module.exports = function staircaseFits() {
|
||||
const els=[...document.querySelectorAll('#learning-loop .learning-loop>*')];
|
||||
const b=els.map(e=>e.getBoundingClientRect());
|
||||
const center=r=>({x:(r.left+r.right)/2,y:(r.top+r.bottom)/2});
|
||||
const close=(a,b)=>Math.abs(a-b)<2;
|
||||
return [[0,1,2],[4,5,6],[8,9,10]].every(([a,arrow,c])=>
|
||||
close(center(b[a]).y,center(b[c]).y)&&close(center(b[a]).y,center(b[arrow]).y)&&
|
||||
b[a].right<=b[arrow].left+2&&b[arrow].right<=b[c].left+2
|
||||
)&&[[2,3,4],[6,7,8]].every(([a,arrow,c])=>
|
||||
close(center(b[a]).x,center(b[c]).x)&&close(center(b[a]).x,center(b[arrow]).x)&&
|
||||
b[a].bottom<=b[arrow].top+2&&b[arrow].bottom<=b[c].top+2
|
||||
)&&els.filter(e=>e.tagName==='SPAN').every(e=>e.scrollWidth<=e.clientWidth+1);
|
||||
};
|
||||
Reference in new issue
Block a user