Author: Lars Michelsen <[email protected]>
Date: Tue Jan 29 20:47:24 2013 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Tue Jan 29 20:47:24 2013 +0100
IE below 9: Fixed invisible lines (z-index was not set)
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/lines.js | 15 +++++++++------
share/userfiles/templates/default.css | 4 ++++
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6fd20b4..a73bf8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Frontend:
* Hiding all kind of javascript error messages automatically on next
successful processing
+ * IE below 9: Fixed invisible lines (z-index was not set)
1.7.4
Core:
diff --git a/share/frontend/nagvis-js/js/lines.js
b/share/frontend/nagvis-js/js/lines.js
index 6edab5d..29b885f 100644
--- a/share/frontend/nagvis-js/js/lines.js
+++ b/share/frontend/nagvis-js/js/lines.js
@@ -57,20 +57,20 @@ function min(arr) {
}
function newX(a, b, x, y) {
- return (Math.cos(Math.atan2(y,x)+Math.atan2(b,a))*Math.sqrt(x*x+y*y));
+ return
Math.round(Math.cos(Math.atan2(y,x)+Math.atan2(b,a))*Math.sqrt(x*x+y*y));
}
function newY(a, b, x, y) {
- return (Math.sin(Math.atan2(y,x)+Math.atan2(b,a))*Math.sqrt(x*x+y*y));
+ return
Math.round(Math.sin(Math.atan2(y,x)+Math.atan2(b,a))*Math.sqrt(x*x+y*y));
}
// Draws polygon based object. By default it draws lines (arrows and also
plain lines)
// FIXME: Make this reload aware
function drawPolygonBasedObject(objectId, num, xCoord, yCoord, z, colorFill,
colorBorder) {
- var xMin = Math.round(min(xCoord));
- var yMin = Math.round(min(yCoord));
- var xMax = Math.round(max(xCoord));
- var yMax = Math.round(max(yCoord));
+ var xMin = min(xCoord);
+ var yMin = min(yCoord);
+ var xMax = max(xCoord);
+ var yMax = max(yCoord);
// Detect if the browser is able to render canvas objects
// If so: Use canvas rendering which performs much better
@@ -126,6 +126,9 @@ function drawPolygonBasedObject(objectId, num, xCoord,
yCoord, z, colorFill, col
oContainer = document.createElement('div');
oLine.appendChild(oContainer);
}
+
+ oContainer.setAttribute('class', 'jsline');
+ oContainer.setAttribute('className', 'jsline');
// Fallback to old line style
var oL = new jsGraphics(oContainer);
diff --git a/share/userfiles/templates/default.css
b/share/userfiles/templates/default.css
index 46c068b..32d14b4 100644
--- a/share/userfiles/templates/default.css
+++ b/share/userfiles/templates/default.css
@@ -106,6 +106,10 @@ div.welcome a:hover {color:#779D2A}
border-color : black;
}
+.jsline div {
+ z-index: 10;
+}
+
a.linelink {
color: #000000;
}
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins