Module: nagvis
Branch: master
Commit: 16112ce2f926cf10072ec48849f2c3cc791d43b5
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=16112ce2f926cf10072ec48849f2c3cc791d43b5

Author: LaMi <[email protected]>
Date:   Sun Mar  7 13:29:10 2010 +0100

Not sending new position information to the core when object has not been moved

---

 share/frontend/wui/js/wui.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/share/frontend/wui/js/wui.js b/share/frontend/wui/js/wui.js
index 899905f..f611256 100644
--- a/share/frontend/wui/js/wui.js
+++ b/share/frontend/wui/js/wui.js
@@ -370,6 +370,11 @@ function saveObjectAfterMoveAndDrop(oObj) {
                oObj.moveTo(oObj.oldX, oObj.oldY);
                return;
        }
+
+       // Skip when the object has not been moved
+       if(oObj.y == oObj.oldY && oObj.x == oObj.oldX) {
+               return;
+       }
        
        // When a grid is enabled align the dragged object in the nearest grid
        if(oViewProperties.grid_show === 1) {
@@ -425,7 +430,7 @@ function saveObjectAfterMoveAndDrop(oObj) {
        } else {
                type = arr[1];
                id = arr[2];
-               
+
                // Don't forget to substract height of header menu
                url = 
oGeneralProperties.path_server+'?mod=Map&act=modifyObject&map='+mapname+'&type='+type+'&id='+id+'&x='+oObj.x+'&y='+(oObj.y
 - getHeaderHeight());
        }


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to