add sketch item/group flip h/v and centering
This commit is contained in:
parent
508507e684
commit
e0d449af50
4 changed files with 59 additions and 1 deletions
|
|
@ -567,6 +567,16 @@ class Polygon {
|
|||
return this.points[this.length - 1];
|
||||
}
|
||||
|
||||
flip(axis) {
|
||||
for (let p of this.points) {
|
||||
p[axis] = -p[axis];
|
||||
}
|
||||
for (let i of this.inner || []) {
|
||||
i.flip(axis);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
swap(x, y) {
|
||||
this._bounds = undefined;
|
||||
if (x) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue