Author: Lars Michelsen <[email protected]>
Date: Sun Jul 31 11:26:16 2011 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Sun Jul 31 11:26:16 2011 +0200
Bugfix: Preventing JS errors when dragging objects out of screen
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/ExtGenericResize.js | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 387fe63..f3b50e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ Frontend
* Bugfix: Fixed undefied var error when having no maps and displaying the
overview page
* Bugfix: Fixed problem with rotation links in header menu with IE8
* Bugfix: A lot of links were not working in IE caused by a broken event
handler
+ * Bugfix: Preventing JS errors when dragging objects out of screen
Core
* omd_install: Installing missing doc/ dir now; Cleaning cache files on
install
diff --git a/share/frontend/nagvis-js/js/ExtGenericResize.js
b/share/frontend/nagvis-js/js/ExtGenericResize.js
index ab2acdf..25fe4da 100644
--- a/share/frontend/nagvis-js/js/ExtGenericResize.js
+++ b/share/frontend/nagvis-js/js/ExtGenericResize.js
@@ -164,6 +164,8 @@ function doMove(event) {
yMin = 8;
el = getReal(target, "className", "resizeMe");
+ if(!isset(el.className))
+ return;
if(el.className.indexOf("resizeMe") !== -1) {
var str = getDirection(event, el);
@@ -204,10 +206,12 @@ function doMove(event) {
function getReal(el, type, value) {
temp = el;
while(isset(temp) && temp != null && temp.tagName != "BODY") {
- if(eval("temp." + type).indexOf(value) !== -1) {
+ var o = eval("temp." + type);
+ if(isset(o) && o.indexOf(value) !== -1) {
el = temp;
return el;
}
+ o = null;
temp = temp.parentElement;
}
return el;
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins