Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/clientIO/joint
/ snapToGrid
Function
snapToGrid
packages/joint-core/src/g/geometry.helpers.mjs:24–27 ·
view source on GitHub ↗
(value, gridSize)
Source
from the content-addressed store, hash-verified
22
};
23
24
export
const
snapToGrid =
function
(value, gridSize) {
25
26
return
gridSize * round(value / gridSize);
27
};
28
29
export
const
toDeg =
function
(rad) {
30
Callers
1
point.mjs
File · 0.90
Calls
1
round
Function · 0.85
Tested by
no test coverage detected