mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-15 04:45:06 +01:00
realtime solving
This commit is contained in:
parent
9d13fefc10
commit
d516298594
2 changed files with 2 additions and 1 deletions
|
|
@ -566,6 +566,7 @@ TCAD.TWO.DragTool.prototype.mousemove = function(e) {
|
|||
this.viewer.screenToModel2(e.x, e.y, this._point);
|
||||
this.obj.translate(this._point.x - x, this._point.y - y);
|
||||
this.viewer.refresh();
|
||||
this.solveRequest();
|
||||
};
|
||||
|
||||
TCAD.TWO.DragTool.prototype.mousedown = function(e) {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ TCAD.TWO.ParametricManager.prototype.solve = function(locked, onSolved) {
|
|||
xhr.onreadystatechange=function() {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
var response = JSON.parse(xhr.responseText);
|
||||
if (response.reqId != request.reqId) {
|
||||
if (response.reqId != pm.REQUEST_COUNTER - 1) {
|
||||
return;
|
||||
}
|
||||
for (var p = 0; p < response.params.length; ++p) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue