Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/marijnh/Eloquent-JavaScript
/ x
Method
x
code/draw_layout.js:98–100 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
96
// The `x` and `y` methods convert from graph coordinates into
97
// canvas coordinates.
98
x(x) {
99
return
this.scaleX * (x - this.offsetX) + nodeSize;
100
}
101
y(y) {
102
return
this.scaleY * (y - this.offsetY) + nodeSize;
103
}
Callers
1
drawGraph
Function · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected