Skip to content

Commit 73bc3af

Browse files
improvement(workspaces): enlarge workspace glyphs slightly past the tile edge
1 parent a2f4994 commit 73bc3af

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎apps/sim/components/identity-tile/identity-tile.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ const GLYPH_SIZE_CLASS = {
4242
const GOO_ALPHA_MATRIX = '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9'
4343

4444
/**
45-
* Crops to the 76-unit span `generateGlyph` fits into (plus a small margin) so the
46-
* glyph fills the tile. Zooming via the viewBox, not the geometry, keeps the gaps
47-
* the goo blur is tuned to.
45+
* Crops inside the 76-unit span `generateGlyph` fits into so the glyph slightly
46+
* overfills the tile; the svg overflows so the outermost tips bleed under half a
47+
* pixel instead of clipping. Zooming via the viewBox, not the geometry, keeps the
48+
* gaps the goo blur is tuned to.
4849
*/
49-
const GLYPH_VIEW_BOX = '10 10 80 80'
50+
const GLYPH_VIEW_BOX = '14 14 72 72'
5051

5152
function glyphShape(shape: GlyphShape, key: number) {
5253
switch (shape.kind) {
@@ -98,7 +99,7 @@ function Glyph({ seed, className, slot, size }: GlyphProps) {
9899
aria-hidden='true'
99100
viewBox={GLYPH_VIEW_BOX}
100101
className={cn(
101-
'shrink-0 text-[var(--text-icon)] dark:text-[var(--text-secondary)]',
102+
'shrink-0 overflow-visible text-[var(--text-icon)] dark:text-[var(--text-secondary)]',
102103
GLYPH_SIZE_CLASS[size],
103104
className
104105
)}

0 commit comments

Comments
 (0)