mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.6.06 - lock axis on point drag
This commit is contained in:
parent
95124e686b
commit
4a1dba33f8
2 changed files with 17 additions and 3 deletions
|
|
@ -206,7 +206,7 @@ function editUnits() {
|
|||
pt.x = graphWidth / 2, pt.y = graphHeight / 4;
|
||||
const p = pt.matrixTransform(viewbox.node().getScreenCTM().inverse());
|
||||
const dx = graphWidth / 4 / scale;
|
||||
const dy = (rulers.data.length * 10) % (graphHeight / 2);
|
||||
const dy = (rulers.data.length * 40) % (graphHeight / 2);
|
||||
const from = [p.x-dx | 0, p.y+dy | 0];
|
||||
const to = [p.x+dx | 0, p.y+dy | 0];
|
||||
rulers.linear([from, to]).draw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue