Skip to content

Commit c46d288

Browse files
committed
feat: text / custom masks, fix preview pan, refactor selection
1 parent 66e4367 commit c46d288

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8081
-3635
lines changed

apps/web/src/components/editor/panels/assets/views/settings/background.tsx

Lines changed: 309 additions & 233 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
function svgCursor({
2+
svg,
3+
hotspotX,
4+
hotspotY,
5+
}: {
6+
svg: string;
7+
hotspotX: number;
8+
hotspotY: number;
9+
}): string {
10+
return `url("data:image/svg+xml,${encodeURIComponent(svg)}") ${hotspotX} ${hotspotY}, crosshair`;
11+
}
12+
13+
/** Hotspot is at the nib tip, which is where anchor points land. */
14+
export const PEN_CURSOR = svgCursor({
15+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
16+
<path d="M 1 1 L 5 2 L 13 10 L 10 13 L 2 5 Z" fill="white" stroke="#111" stroke-width="1" stroke-linejoin="round"/>
17+
<path d="M 1 1 L 5 2 L 2 5 Z" fill="#111"/>
18+
</svg>`,
19+
hotspotX: 1,
20+
hotspotY: 1,
21+
});

0 commit comments

Comments
 (0)