Module: nagvis Branch: nagvis-1.5 Commit: 941c83c87f17bdd47dcffad9f4f50cd8f0902fa7 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=941c83c87f17bdd47dcffad9f4f50cd8f0902fa7
Author: Lars Michelsen <[email protected]> Date: Tue Feb 1 23:05:17 2011 +0100 Fixed dragging relative labels of line objects in WUI --- share/frontend/wui/js/wui.js | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/share/frontend/wui/js/wui.js b/share/frontend/wui/js/wui.js index 262bc3c..ea12035 100644 --- a/share/frontend/wui/js/wui.js +++ b/share/frontend/wui/js/wui.js @@ -392,10 +392,18 @@ function saveObjectAfterMoveAndDrop(oObj) { // Handle relative and absolute aligned labels if(align === 'rel') { - // Calculate relative coordinates - var objX = pxToInt(document.getElementById('box_'+type+'_'+id).style.left); - var objY = pxToInt(document.getElementById('box_'+type+'_'+id).style.top); - + var objX, objY; + var oLine = document.getElementById('line_'+type+'_'+id); + if(oLine) { + objX = document.getElementById('line_'+type+'_'+id).startX; + objY = document.getElementById('line_'+type+'_'+id).startY; + oLine = null; + } else { + // Calculate relative coordinates + objX = pxToInt(document.getElementById('box_'+type+'_'+id).style.left); + objY = pxToInt(document.getElementById('box_'+type+'_'+id).style.top); + } + // +3: Is the borderWidth of the object highlighting. // The header menu height is not needed when calculating relative coords x = oObj.x - objX + borderWidth; ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
