mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 10:25:36 +01:00
bulk operation for adding horizontal and vertical constraints
This commit is contained in:
parent
86743b3a62
commit
cbab1646b9
1 changed files with 8 additions and 2 deletions
|
|
@ -199,11 +199,17 @@ ParametricManager.prototype.lock = function(objs) {
|
|||
};
|
||||
|
||||
ParametricManager.prototype.vertical = function(objs) {
|
||||
this.add(new Constraints.Vertical(fetch.line(objs)));
|
||||
const lines = fetch.lines(objs);
|
||||
for (let line of lines) {
|
||||
this.add(new Constraints.Vertical(line));
|
||||
}
|
||||
};
|
||||
|
||||
ParametricManager.prototype.horizontal = function(objs) {
|
||||
this.add(new Constraints.Horizontal(fetch.line(objs)));
|
||||
const lines = fetch.lines(objs);
|
||||
for (let line of lines) {
|
||||
this.add(new Constraints.Horizontal(line));
|
||||
}
|
||||
};
|
||||
|
||||
ParametricManager.prototype.parallel = function(objs) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue