Author:   Lars Michelsen <[email protected]>
Date:     Sat Dec 24 14:53:47 2011 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Sat Dec 24 14:53:47 2011 +0100

Bugfix: Preventing JS error when trying to position objects relative but
no target object can be found

---

 ChangeLog                           |    2 ++
 share/frontend/nagvis-js/js/edit.js |    5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 77116f7..7674845 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 1.6.3
 Frontend
   * Bugfix: Preventing loops in relative coords
+  * Bugfix: Preventing JS error when trying to position objects relative but
+  no target object can be found
 
 1.6.2
 Core
diff --git a/share/frontend/nagvis-js/js/edit.js 
b/share/frontend/nagvis-js/js/edit.js
index 2bc3247..738ae40 100644
--- a/share/frontend/nagvis-js/js/edit.js
+++ b/share/frontend/nagvis-js/js/edit.js
@@ -376,8 +376,9 @@ function dragStop(event) {
 
     var oParent = null;
     if(event.ctrlKey) {
-        var oParent = getNearestObject(draggingObject, draggingObject.x, 
draggingObject.y)
-        oParent.highlight(false);
+        var oParent = getNearestObject(draggingObject, draggingObject.x, 
draggingObject.y);
+        if(oParent)
+            oParent.highlight(false);
     }
 
     if(event.shiftKey)


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to