version 1.7, 2005/06/09 16:35:51
|
version 1.8, 2005/06/13 10:35:04
|
Line 14 You should have received a copy of the G
|
Line 14 You should have received a copy of the G
|
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
|
Authors: ROC 23.11.2004 |
Authors: ROC 10.6.2005 |
*/ |
*/ |
|
|
var hllibVersion = "1.0.1"; |
var hllibVersion = "1.0.2"; |
var hlAreas = new Object(); |
var hlAreas = new Object(); |
var hlTrafos = new Object(); |
var hlTrafos = new Object(); |
|
|
Line 89 function placeAreas() {
|
Line 89 function placeAreas() {
|
} |
} |
moveElement(img, rect); |
moveElement(img, rect); |
} |
} |
highlightPair(area.id, area.permanent); |
highlightMark(area.id, area.permanent); |
} |
} |
} |
} |
// add z-index (largest value for smallest area) |
// add z-index (largest value for smallest area) |
Line 104 function placeAreas() {
|
Line 104 function placeAreas() {
|
} |
} |
} |
} |
|
|
function highlightPair(id, highlight) { |
function highlightLink(id, highlight) { |
// hightlights or unhighlights the link and image of id |
// hightlights or unhighlights the link of id |
//alert("highlightpair: "+id+" "+highlight); |
|
var area = hlAreas[id]; |
|
var img = getElement("i."+id); |
|
var link = getElement("a."+id); |
var link = getElement("a."+id); |
if (highlight) { |
if (highlight) { |
|
// highlight |
if (link.style) { |
if (link.style) { |
link.style.backgroundColor = "#f08080"; |
link.style.backgroundColor = "#f08080"; |
} else if (link.layers) { |
} else if (link.layers) { |
link.bgColor = "#f08080"; |
link.bgColor = "#f08080"; |
} |
} |
|
} else { |
|
// unhighlight |
|
if (link.style) { |
|
link.style.backgroundColor = ""; |
|
} else if (link.layers) { |
|
link.bgColor = null; |
|
} |
|
} |
|
} |
|
|
|
function highlightMark(id, highlight) { |
|
// hightlights or unhighlights the area/img of id |
|
var area = hlAreas[id]; |
|
var img = getElement("i."+id); |
|
if (highlight) { |
|
// highlight |
if (area.type == "arrow") { |
if (area.type == "arrow") { |
if (img.style) { |
if (img.style) { |
img.style.borderStyle = "solid"; |
img.style.borderStyle = "solid"; |
Line 141 function highlightPair(id, highlight) {
|
Line 155 function highlightPair(id, highlight) {
|
} |
} |
} else { |
} else { |
// unhighlight |
// unhighlight |
if (link.style) { |
|
link.style.backgroundColor = ""; |
|
} else if (link.layers) { |
|
link.bgColor = null; |
|
} |
|
if (! area.permanent) { |
|
if (area.type == "arrow") { |
if (area.type == "arrow") { |
if (img.style) { |
if (img.style) { |
img.style.borderStyle = "none"; |
img.style.borderStyle = "none"; |
Line 154 function highlightPair(id, highlight) {
|
Line 162 function highlightPair(id, highlight) {
|
img.bgColor = null; |
img.bgColor = null; |
} |
} |
} else if (area.type == "text") { |
} else if (area.type == "text") { |
|
var txt = getElement("t."+id); |
if (img.style) { |
if (img.style) { |
img.style.background = "url(trans_img)"; |
img.style.background = "url(trans_img)"; |
} else if (img.layers) { |
} else if (img.layers) { |
img.background.src = null; |
img.background.src = null; |
} |
} |
var txt = getElement("t."+id); |
|
if (txt.style) { |
if (txt.style) { |
txt.style.visibility = "hidden"; |
txt.style.visibility = "hidden"; |
} |
} |
Line 172 function highlightPair(id, highlight) {
|
Line 180 function highlightPair(id, highlight) {
|
} |
} |
} |
} |
} |
} |
|
|
|
function highlightPair(id, highlight) { |
|
// hightlights or unhighlights the link and image of id |
|
//alert("highlightpair: "+id+" "+highlight); |
|
var area = hlAreas[id]; |
|
highlightLink(id, highlight); |
|
if (!area.permanent) { |
|
highlightMark(id, highlight); |
|
} |
} |
} |
|
|
function init() { |
function init() { |