mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 09:24:18 +01:00
taking bound into account for an ellipse and bezier curve
This commit is contained in:
parent
d36498048b
commit
602a682e48
1 changed files with 9 additions and 0 deletions
|
|
@ -464,6 +464,15 @@ function BBox() {
|
||||||
this.checkCircBounds(obj.c.x, obj.c.y, obj.r.get());
|
this.checkCircBounds(obj.c.x, obj.c.y, obj.r.get());
|
||||||
} else if (obj._class === T.CIRCLE) {
|
} else if (obj._class === T.CIRCLE) {
|
||||||
this.checkCircBounds(obj.c.x, obj.c.y, obj.r.get());
|
this.checkCircBounds(obj.c.x, obj.c.y, obj.r.get());
|
||||||
|
} else if (obj._class === T.ELLIPSE || obj._class === T.ELL_ARC) {
|
||||||
|
this.checkCircBounds(obj.centerX, obj.centerY, Math.max(obj.radiusX, obj.radiusY));
|
||||||
|
} else if (obj) {
|
||||||
|
obj.accept((o) => {
|
||||||
|
if (o._class == T.END_POINT) {
|
||||||
|
this.checkBounds(o.x, o.y);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
// } else if (obj._class === T.DIM || obj._class === T.HDIM || obj._class === T.VDIM) {
|
// } else if (obj._class === T.DIM || obj._class === T.HDIM || obj._class === T.VDIM) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue