https://github.com/robleto/snap-45_90
A Figma plug-in to convert lines to a clean 45 or 90 degree angle.
https://github.com/robleto/snap-45_90
figma figma-plugin pen-tool vector
Last synced: 8 months ago
JSON representation
A Figma plug-in to convert lines to a clean 45 or 90 degree angle.
- Host: GitHub
- URL: https://github.com/robleto/snap-45_90
- Owner: robleto
- Created: 2025-09-23T13:03:36.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-23T14:39:57.000Z (9 months ago)
- Last Synced: 2025-09-23T16:28:07.466Z (9 months ago)
- Topics: figma, figma-plugin, pen-tool, vector
- Language: HTML
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Snap 45/90 — Figma Plugin
## Overview
Snap lines and straight vector segments to clean angles. Use it live while drawing or on demand.
- Modes:
- Default: 15° increments
- Strict: 0° / 45° / 90° / 135° only
- Two ways to work:
- Live: auto-snap while you select/move vector points
- On-demand: press "Snap Selection Now"
---
## Installation (Development)
1. Open Figma → **Plugins → Development → New Plugin… → Link existing plugin**.
2. Point to the folder containing this plugin’s `manifest.json`.
3. Run from **Plugins → Development → Snap 45/90**.
---
## Files
- `manifest.json` — plugin metadata; points to `code.js` and `ui.html`.
- `code.js` — main plugin logic (snapping lines and vectors).
- `ui.html` — control panel UI with Actions and Settings.
- `README.md` — you’re reading it.
---
## Usage
1. Run **Snap 45/90** from the Figma Plugins menu.
2. In the UI:
- Actions
- "Snap Selection Now" — snaps current selection immediately.
- "Close" — closes the panel.
- Settings
- "45° only" — restricts snapping to 0/45/90/135.
- "Auto-snap" — live snapping while you select/move points.
- "Batch undo" — group rapid edits into one undo step.
3. Draw or edit vectors as usual. With Auto-snap on, straight segments align automatically; or use the action to snap once.
---
## Limitations
- Snapping happens after edits are applied (post-change). It cannot constrain the Pen tool mid-draw.
- Works on lines and straight segments of vectors; curves are ignored.
- If a vector node itself is rotated, the plugin prefers rotating the node; otherwise it adjusts vertices to keep segment length.
---
## Tips & Troubleshooting
- Nothing happens? Select a Line or Vector (straight segments) and try again.
- Undo granularity: enable "Batch undo" to coalesce frequent auto-snaps.
- To fix a single middle segment: nudge one endpoint or select and press "Snap Selection Now".
- Visual precision: zoom in—guides can look off at low zoom.
---
## License
MIT — free to use and modify.