Author:   Lars Michelsen <[email protected]>
Date:     Sun Apr 10 22:32:09 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sun Apr 10 22:32:09 2011 +0200

The frontends drag code honors enabled grids now

---

 .../frontend/nagvis-js/js/NagVisStatefulObject.js  |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js 
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index b47a4db..1b8de7b 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -1162,7 +1162,13 @@ var NagVisStatefulObject = NagVisObject.extend({
                var jsObj      = getMapObjByDomObjId(objId);
 
                if(viewType !== 'line')
-                       anchorId = -1
+                       anchorId = -1;
+
+               // Honor the enabled grid and reposition the object after 
dropping
+               if(oViewProperties.grid_show === 1) {
+                   [ jsObj.conf.x, jsObj.conf.y ] = coordsToGrid(jsObj.conf.x, 
jsObj.conf.y);
+                   jsObj.reposition();
+               }
 
                // Make relative when oParent set and not already relative
                if(isset(oParent))


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to