diff --git a/web/app/sketch/circle.js b/web/app/sketch/circle.js index ec9e46d7..8bb69d74 100644 --- a/web/app/sketch/circle.js +++ b/web/app/sketch/circle.js @@ -57,10 +57,19 @@ TCAD.TWO.EditCircleTool.prototype.mousemove = function(e) { var p = this.viewer.screenToModel(e); var r = TCAD.math.distance(p.x, p.y, this.circle.c.x, this.circle.c.y); this.circle.r.set(r); + if (!e.shiftKey) { + this.solveRequest(2); + } this.viewer.refresh(); } }; +TCAD.TWO.EditCircleTool.prototype.solveRequest = function(fineLevel) { + this.solver = this.viewer.parametricManager.prepare([this.circle.r]); + this.solver.solve(fineLevel); + this.solver.sync(); +}; + TCAD.TWO.EditCircleTool.prototype.mouseup = function(e) { if (this.circle == null) { var p = this.viewer.screenToModel(e); @@ -70,6 +79,8 @@ TCAD.TWO.EditCircleTool.prototype.mouseup = function(e) { this.layer.objects.push(this.circle); this.viewer.refresh(); } else { + this.solveRequest(0); + this.viewer.refresh(); this.viewer.toolManager.releaseControl(); } };