geometrix 0.5.30 → 0.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100,7 +100,13 @@ function radius2canvas(iRadius, iAdjust) {
|
|
|
100
100
|
if (roundZero(iAdjust.scaleX - Math.abs(iAdjust.scaleY)) !== 0) {
|
|
101
101
|
throw `err683: iAdjust.scaleX and scaleY differ ${iAdjust.scaleX} ${iAdjust.scaleY}`;
|
|
102
102
|
}
|
|
103
|
+
if (iAdjust.scaleX < 0) {
|
|
104
|
+
throw `err684: iAdjust.scaleX ${iAdjust.scaleX} is negative`;
|
|
105
|
+
}
|
|
103
106
|
const rRadius = iRadius * iAdjust.scaleX;
|
|
107
|
+
if (rRadius < 0) {
|
|
108
|
+
throw `err685: rRadius for canvas ${rRadius} is negative`;
|
|
109
|
+
}
|
|
104
110
|
return rRadius;
|
|
105
111
|
}
|
|
106
112
|
function adjustZero() {
|
|
@@ -2334,6 +2340,9 @@ var ContourCircle = class _ContourCircle extends AContour {
|
|
|
2334
2340
|
this.py = iy;
|
|
2335
2341
|
this.radius = iRadius;
|
|
2336
2342
|
this.imposedColor = icolor;
|
|
2343
|
+
if (iRadius < 0) {
|
|
2344
|
+
throw `err432: iRadius ${iRadius} is negative at circle ix ${ix}, iy ${iy}`;
|
|
2345
|
+
}
|
|
2337
2346
|
}
|
|
2338
2347
|
/** @internal */
|
|
2339
2348
|
clone() {
|