Skip to content

Commit

Permalink
Added code to check that X, Y coordinates have actually changed befor…
Browse files Browse the repository at this point in the history
…e sending updated coordinates to the server.
  • Loading branch information
Mignon Belongie committed Mar 7, 2008
1 parent 293e036 commit 511bf19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions platform/ui/plugins/reactors/DatabaseOutputReactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dojo.declare("plugins.reactors.DatabaseOutputReactor",
});
},
handleMoveStop: function(mover) {
if (this.config.X == mover.host.node.offsetLeft && this.config.Y == mover.host.node.offsetTop) {
return;
}
this.config.X = mover.host.node.offsetLeft;
this.config.Y = mover.host.node.offsetTop;

Expand Down
3 changes: 3 additions & 0 deletions platform/ui/plugins/reactors/FilterReactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ dojo.declare("plugins.reactors.FilterReactor",
});
},
handleMoveStop: function(mover) {
if (this.config.X == mover.host.node.offsetLeft && this.config.Y == mover.host.node.offsetTop) {
return;
}
this.config.X = mover.host.node.offsetLeft;
this.config.Y = mover.host.node.offsetTop;

Expand Down
3 changes: 3 additions & 0 deletions platform/ui/plugins/reactors/Reactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ dojo.declare("plugins.reactors.Reactor",
dojo.connect(m5, "onMoveStop", this, this.handleMoveStop);
},
handleMoveStop: function(mover) {
if (this.config.X == mover.host.node.offsetLeft && this.config.Y == mover.host.node.offsetTop) {
return;
}
this.config.X = mover.host.node.offsetLeft;
this.config.Y = mover.host.node.offsetTop;

Expand Down

0 comments on commit 511bf19

Please sign in to comment.