Initial commit: drawNET Alpha v1.0 - Professional Topology Designer with Full i18n and Performance Optimizations

This commit is contained in:
leeyj
2026-03-22 22:37:24 +09:00
commit 5cea93e317
192 changed files with 14449 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
/**
* Snap a position to the nearest grid interval, accounting for the object's dimension
* to ensure its edges or center align properly with the grid.
*/
export function snapPosition(pos, dimension, spacing) {
const offset = (dimension / 2) % spacing;
return Math.round((pos - offset) / spacing) * spacing + offset;
}