trim more fields that don't need to be pre-allocated

This commit is contained in:
Stewart Allen 2021-07-04 21:17:30 -04:00
commit 2ebc85458f
3 changed files with 6 additions and 7 deletions

View file

@ -20,7 +20,6 @@
if (key) {
this._key = key;
}
this.poly = null; // parent polygon
}
get key() {
@ -38,7 +37,9 @@
const PRO = Point.prototype;
BASE.Point = Point;
BASE.newPoint = newPoint;
BASE.pointFromClipper = function(cp, z) {
return newPoint(cp.X / CONF.clipper, cp.Y / CONF.clipper, z);
};

View file

@ -31,9 +31,10 @@
this.id = seqid++; // polygon unique id
this.open = false;
this.points = []; // ordered array of points
this.parent = null; // enclosing parent polygon
this.depth = 0; // depth nested from top parent (density for support fill)
if (points) this.addPoints(points);
if (points) {
this.addPoints(points);
}
}
get length() {
@ -63,6 +64,7 @@
}
BASE.Polygon = Polygon;
BASE.newPolygon = newPolygon;
const PRO = Polygon.prototype;

View file

@ -2912,10 +2912,6 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
DOC.activeElement.blur();
}
// function setExpert(bool) {
// UC.setExpert(UI.expert.checked = settings.controller.expert = bool);
// }
function getMode() {
return settings.mode;
}