realtime solving

This commit is contained in:
Val Erastov 2014-10-02 00:23:00 -07:00
parent 9d13fefc10
commit d516298594
2 changed files with 2 additions and 1 deletions

View file

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

View file

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