Module: nagvis Branch: master Commit: e553612b763d01311443d9684cd648c5f46903da URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=e553612b763d01311443d9684cd648c5f46903da
Author: Lars Michelsen <[email protected]> Date: Tue Oct 19 21:00:39 2010 +0200 Fixed problem in WUI where the x/y coords were destroyed by a drag start and stop without moving the mouse on page --- share/frontend/wui/js/wui.js | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/share/frontend/wui/js/wui.js b/share/frontend/wui/js/wui.js index 2509c9f..dc3c1c5 100644 --- a/share/frontend/wui/js/wui.js +++ b/share/frontend/wui/js/wui.js @@ -775,6 +775,8 @@ function dragStart(event) { event.cancelBubble = true;*/ draggingObject = target; + draggingObject.x = draggingObject.offsetLeft; + draggingObject.y = draggingObject.offsetTop - getHeaderHeight(); // Save relative offset of the mouse to the snapin title to prevent flipping on drag start dragObjectOffset = [ posy - draggingObject.offsetTop - getHeaderHeight(), @@ -843,7 +845,8 @@ function moveRelativeObject(parentId, parentTop, parentLeft) { } function dragStop() { - if(!draggingEnabled || !draggingObject) + if(draggingObject === null || !draggingEnabled + || typeof draggingObject.y == 'undefined' || typeof draggingObject.x == 'undefined') return; // When x or y are negative just return this and make no change ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
