UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) • 524 B
export function clusterCountText(t){return t>99?"99+":String(t)}export function clusterCounterCircle(t){const o=t*PIN_HEAD_FACTOR;return{cx:t/2,cy:o+PIN_EDGE_PX,r:o*CLUSTER_CIRCLE_FACTOR}}export function clusterCountFontPx(t){const o=3*CLUSTER_COUNT_ADVANCE_EM/2,n=CLUSTER_COUNT_CAP_EM/2;return CLUSTER_COUNT_FIT*t/Math.hypot(o,n)}export const PIN_ASPECT=93/81,PIN_HEAD_FACTOR=.37,PIN_EDGE_PX=1.4,CLUSTER_CIRCLE_FACTOR=.78,CLUSTER_COUNT_ADVANCE_EM=.58,COUNT_BLOCK_HALF_EM=.61,CLUSTER_COUNT_CAP_EM=.72,CLUSTER_COUNT_FIT=.88;