mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-15 21:05:22 +01:00
add horizontal and vertical constraints transactionally to avoid unnecessary refreshes
This commit is contained in:
parent
cbab1646b9
commit
c7b0a12958
1 changed files with 2 additions and 8 deletions
|
|
@ -199,17 +199,11 @@ ParametricManager.prototype.lock = function(objs) {
|
|||
};
|
||||
|
||||
ParametricManager.prototype.vertical = function(objs) {
|
||||
const lines = fetch.lines(objs);
|
||||
for (let line of lines) {
|
||||
this.add(new Constraints.Vertical(line));
|
||||
}
|
||||
this.addAll(fetch.lines(objs).map(line => new Constraints.Vertical(line)));
|
||||
};
|
||||
|
||||
ParametricManager.prototype.horizontal = function(objs) {
|
||||
const lines = fetch.lines(objs);
|
||||
for (let line of lines) {
|
||||
this.add(new Constraints.Horizontal(line));
|
||||
}
|
||||
this.addAll(fetch.lines(objs).map(line => new Constraints.Horizontal(line)));
|
||||
};
|
||||
|
||||
ParametricManager.prototype.parallel = function(objs) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue