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

Author: Lars Michelsen <[email protected]>
Date:   Sat Apr 17 18:06:51 2010 +0200

#252 Highlight border is now no problem for object movements anymore

---

 share/frontend/wui/js/wui.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/share/frontend/wui/js/wui.js b/share/frontend/wui/js/wui.js
index 6a486f3..9fe434f 100644
--- a/share/frontend/wui/js/wui.js
+++ b/share/frontend/wui/js/wui.js
@@ -407,8 +407,9 @@ function saveObjectAfterMoveAndDrop(oObj) {
                        // Substract height of header menu here
                        objY += getHeaderHeight();
                        
-                       x = oObj.x - objX;
-                       y = oObj.y - objY;
+                       // +3: Is the borderWidth of the object highlighting
+                       x = oObj.x - objX + 3;
+                       y = oObj.y - objY + 3;
                        
                        // Add + sign to mark relative positive coords (On 
negative relative coord
                        // the - sign is added automaticaly
@@ -431,8 +432,12 @@ function saveObjectAfterMoveAndDrop(oObj) {
                type = arr[1];
                id = arr[2];
 
+               // +3: Is the borderWidth of the object highlighting
+               x = oObj.x + 3;
+               y = oObj.y - getHeaderHeight() + 3;
+
                // 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());
+               url = 
oGeneralProperties.path_server+'?mod=Map&act=modifyObject&map='+mapname+'&type='+type+'&id='+id+'&x='+x+'&y='+y;
        }
        
        // Sync ajax request


------------------------------------------------------------------------------
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