bulk operation for adding horizontal and vertical constraints

This commit is contained in:
Val Erastov 2016-12-20 22:42:15 -08:00
parent 86743b3a62
commit cbab1646b9

View file

@ -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) {