mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 01:44:19 +01:00
fix ellipse picking
This commit is contained in:
parent
0dc159eb1f
commit
c29a46fc95
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ export class Ellipse extends SketchObject {
|
|||
toEllipseCoordinateSystem(point) {
|
||||
let x = point.x - this.centerX;
|
||||
let y = point.y - this.centerY;
|
||||
const angle = Math.atan2(y, x) + this.rotation;
|
||||
const angle = Math.atan2(y, x) - this.rotation;
|
||||
const distance = math.distance(0, 0, x, y);
|
||||
x = distance * Math.cos(angle);
|
||||
y = distance * Math.sin(angle);
|
||||
|
|
|
|||
Loading…
Reference in a new issue