You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hy-screen-2.0/docs/assets/featurePanelLayout-f3191169...

1 lines
817 B

const u=480;function o(H,A,n){return Math.min(Math.max(H,A),n)}function F({point:H,rowCount:A=0,loading:n=!1,empty:s=!1,safeLeft:h=448,safeRight:r=1472,preferredTop:T=112,safeTop:L=72,preserveDesiredHeight:P=!1}){if(!H)return{width:480,height:176,style:{}};const i=o(Number(A)||0,0,12),R=n||s?176:58+Math.max(i,1)*38,E=o(R,176,420),t=o(H.y-18,72,1080-28),a=t-T,I=t-L;let _=E,e=t-E;a>=112?(_=Math.min(E,a),e=t-_):I>=112?(_=Math.min(E,I),e=t-_):(_=Math.max(112,Math.min(E,t-72)),e=t-_),P&&(_=E,e=o(t-E,T,1080-E-28));const N=o(h,24,1920-480-24),D=o(r,N+480,1920-24),c=o(H.x-480/2,N,D-480),M=o(H.x-c,28,480-28);return{width:480,height:Math.round(_),style:{left:`${Math.round(c)}px`,top:`${Math.round(e)}px`,right:"auto",bottom:"auto",width:"480px","--feature-panel-anchor-x":`${Math.round(M)}px`}}}export{u as F,F as c};