burg remapping

This commit is contained in:
Mészáros Gergely 2021-08-13 20:37:56 +02:00
parent 36248e36b5
commit 6f97864962
3 changed files with 26 additions and 15 deletions

View file

@ -27,8 +27,8 @@ const generateSubmap = debounce(function (x, y, w, h) {
progress: p => progressUI.innerHTML = p,
}
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
const projection = (x, y) => {
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
return [x * (x1-x0) / graphWidth + x0, y * (y1-y0) / graphHeight + y0]
}