MCPcopy Create free account
hub / github.com/codecombat/codecombat / mapToSvgY

Method mapToSvgY

app/views/play/CampaignView.js:1545–1548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1543 // before mapping into the SVG's top-left–based pixel space.
1544 const mapToSvgX = xPercent => (xPercent / 100) * mapWidth
1545 const mapToSvgY = yPercentFromBottom => {
1546 const yPercentFromTop = 100 - yPercentFromBottom
1547 return (yPercentFromTop / 100) * mapHeight
1548 }
1549
1550 // Container for per-path markers (arrow heads, etc.)
1551 const defs = document.createElementNS(svgNS, 'defs')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected